Merge remote-tracking branch 'origin/master' into master

This commit is contained in:
marco
2020-10-08 20:43:17 +02:00
4 changed files with 22 additions and 14 deletions
+2 -1
View File
@@ -79,6 +79,7 @@ def peliculas(item):
anime = True
patronNext = r'href="([^"]+)" title="[^"]+" class="lcp_nextlink"'
action = 'findvideos'
# debug=True
if item.args == 'last':
patronBlock = r'<table>(?P<block>.*?)</table>'
patron = r'<tr><td><a href="(?P<url>[^"]+)">\s*[^>]+>(?P<title>.*?)(?:\s(?P<year>\d{4}))? (?:Streaming|</b>)'
@@ -98,7 +99,7 @@ def peliculas(item):
return item
else:
patronBlock = r'<div class="entry-content pagess">(?P<block>.*?)</ul>'
patron = r'<li><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
patron = r'<li\s*><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
if item.contentType == 'tvshow':
action = 'episodios'
anime = True
+4 -2
View File
@@ -16,6 +16,7 @@ session=requests.Session()
response = session.get(host)
csrf_token = support.match(response.text, patron= 'name="csrf-token" content="([^"]+)"').match
headers = {'content-type': 'application/json;charset=UTF-8',
'Referer': host,
'x-csrf-token': csrf_token,
'Cookie' : '; '.join([x.name + '=' + x.value for x in response.cookies])}
@@ -99,9 +100,10 @@ def peliculas(item):
records = json.loads(support.match(data, patron=r'slider-title titles-json="(.*?)" slider-name="').matches[item.args])
elif not item.search:
payload = json.dumps({'type': videoType, 'offset':offset, 'genre':item.args})
records = json.loads(requests.post(host + '/infinite/browse', headers=headers, data=payload).json()['records'])
records = requests.post(host + '/api/browse', headers=headers, data=payload).json()['records']
else:
records = requests.get(host + '/search?q=' + item.search + '&live=true', headers=headers).json()['records']
payload = json.dumps({'q': item.search})
records = requests.post(host + '/api/search', headers=headers, data=payload).json()['records']
if records and type(records[0]) == list:
js = []