51def response(resp):
52
53 resp = loads(resp.text)
54
55 mwv_result = resp['result']
56 mwv_result_list = mwv_result['results']
57
58 results = []
59
60 for item in mwv_result_list:
61
62 item['hms'] = str(datetime.timedelta(seconds=item['duration']))
63
64 results.append(
65 {
66 'url': item['url_video_hd'].replace("http://", "https://"),
67 'title': "%(channel)s: %(title)s (%(hms)s)" % item,
68 'length': item['hms'],
69 'content': "%(description)s" % item,
70 'iframe_src': item['url_video_hd'].replace("http://", "https://"),
71 'template': 'videos.html',
72 }
73 )
74
75 return results