mirror of https://gitlab.com/bashrc2/epicyon
Check that url exists
parent
7fe094c540
commit
377754c95b
3
utils.py
3
utils.py
|
@ -4686,6 +4686,7 @@ def get_media_url_from_video(post_json_object: {}) -> (str, str, str, str):
|
|||
media_url = None
|
||||
media_torrent = None
|
||||
media_magnet = None
|
||||
if post_json_object.get('url'):
|
||||
if isinstance(post_json_object['url'], list):
|
||||
for media_link in post_json_object['url']:
|
||||
if not isinstance(media_link, dict):
|
||||
|
@ -4704,4 +4705,6 @@ def get_media_url_from_video(post_json_object: {}) -> (str, str, str, str):
|
|||
if not media_url:
|
||||
media_type = media_link['mediaType']
|
||||
media_url = remove_html(media_link['href'])
|
||||
else:
|
||||
print('WARN: video url does not exist ' + str(post_json_object))
|
||||
return media_type, media_url, media_torrent, media_magnet
|
||||
|
|
Loading…
Reference in New Issue