Aggiornamento StreamingCommunity
This commit is contained in:
@@ -236,6 +236,7 @@ def episodios(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.callAds('https://thaudray.com/5/3523301', host)
|
||||
# Fix for old items in videolibrary
|
||||
if item.episodeid and not item.episodeid in item.url:
|
||||
item.url += item.episodeid
|
||||
|
||||
@@ -1659,3 +1659,14 @@ def stackCheck(values):
|
||||
return True
|
||||
frame = frame.f_back
|
||||
return False
|
||||
|
||||
|
||||
def callAds(url, host):
|
||||
try:
|
||||
import requests
|
||||
headers = {{'User-Agent': httptools.random_useragent(),
|
||||
'Origin': host,
|
||||
'Referer': host}}
|
||||
requests.get(url, headers=headers)
|
||||
except:
|
||||
pass
|
||||
@@ -44,13 +44,21 @@ def compose(url):
|
||||
subs = []
|
||||
video_urls = []
|
||||
info = support.match(url, patron=r'LANGUAGE="([^"]+)",\s*URI="([^"]+)|RESOLUTION=\d+x(\d+).*?(http[^"\s]+)', headers={'User-Agent':UA}).matches
|
||||
if info:
|
||||
if info and not logger.testMode: # ai test non piace questa parte
|
||||
for lang, sub, res, url in info:
|
||||
if sub and not logger.testMode: # ai test non piace questa parte
|
||||
if sub:
|
||||
while True:
|
||||
match = support.match(sub, patron=r'(http[^\s\n]+)').match
|
||||
if match:
|
||||
sub = httptools.downloadpage(match).data
|
||||
else:
|
||||
break
|
||||
if lang == 'auto': lang = 'ita-forced'
|
||||
s = config.get_temp_file(lang +'.srt')
|
||||
subs.append(s)
|
||||
filetools.write(s, support.vttToSrt(httptools.downloadpage(support.match(sub, patron=r'(http[^\s\n]+)').match).data))
|
||||
filetools.write(s, support.vttToSrt(sub))
|
||||
elif url:
|
||||
video_urls.append(['m3u8 [{}]'.format(res), '{}|User-Agent={}'.format(url, UA), 0, subs])
|
||||
return video_urls
|
||||
else:
|
||||
video_urls.append(['m3u8', '{}|User-Agent={}'.format(url, UA)])
|
||||
return video_urls
|
||||
|
||||
Reference in New Issue
Block a user