You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
517 B
Python
22 lines
517 B
Python
import re
|
|
from resolvers import *
|
|
|
|
def resolve(url):
|
|
if re.match("https?:\/\/(www\.)?putlocker\.com", url) is not None:
|
|
return putlocker.resolve(url)
|
|
elif re.match("https?:\/\/(www\.)?sockshare\.com", url) is not None:
|
|
return sockshare.resolve(url)
|
|
elif re.match("https?:\/\/(www\.)?1channel\.ch\/external\.php", url) is not None:
|
|
return onechannel.resolve(url)
|
|
else:
|
|
return {}
|
|
|
|
def recurse(url):
|
|
while True:
|
|
result = resolve(url)
|
|
|
|
if 'url' not in result:
|
|
return result
|
|
|
|
url = result['url']
|