[common] fix infinite redirecting

This commit is contained in:
Mort Yao 2015-09-21 10:17:56 +02:00
parent c3ac87a7a1
commit e075433563

View File

@ -1118,8 +1118,10 @@ def url_to_module(url):
if location is None:
from .extractors import embed
return embed, url
else:
elif location != url:
return url_to_module(location)
else:
raise NotImplementedError(url)
def any_download(url, **kwargs):
m, url = url_to_module(url)