int_or_none,
parse_duration,
try_get,
+ url_or_none,
)
from .dailymotion import DailymotionIE
def sign(manifest_url, manifest_id):
for host in ('hdfauthftv-a.akamaihd.net', 'hdfauth.francetv.fr'):
- signed_url = self._download_webpage(
+ signed_url = url_or_none(self._download_webpage(
'https://%s/esi/TA' % host, video_id,
'Downloading signed %s manifest URL' % manifest_id,
fatal=False, query={
'url': manifest_url,
- })
- if (signed_url and isinstance(signed_url, compat_str) and
- re.search(r'^(?:https?:)?//', signed_url)):
+ }))
+ if signed_url:
return signed_url
return manifest_url