Fix episodi Toonitalia
This commit is contained in:
@@ -93,17 +93,15 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
def get_ep(item):
|
||||
find = ''
|
||||
data = support.match(item, headers=headers).data
|
||||
match = support.match(data, patron=r'(?: /> |<p>)(?:(?P<season>\d+)×)?(?P<episode>\d+)(?:\s+–\s+)?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)').matches
|
||||
if match:
|
||||
for m in match:
|
||||
find += '{}{:02d}|{}|{}|'.format(m[0]+'x' if m[0] else '', int(m[1]), clean_title(m[2]), m[3])
|
||||
return find
|
||||
|
||||
data = get_ep(item)
|
||||
patron = r'(?P<episode>[^|]+)\|(?P<title>[^|]+)\|(?P<data>[^|]+)\|'
|
||||
# debug = True
|
||||
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
||||
# data = ''
|
||||
# match = support.match(item, headers=headers, patron=r'(?: /> |<p>)(?:(?P<season>\d+)×)?(?P<episode>\d+)(?:\s+–\s+)?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)').matches
|
||||
# if match:
|
||||
# for m in match:
|
||||
# data += '{}{:02d}|{}|{}|'.format(m[0]+'x' if m[0] else '', int(m[1]), clean_title(m[2]), m[3])
|
||||
#
|
||||
# patron = r'(?P<episode>[^|]+)\|(?P<title>[^|]+)\|(?P<data>[^|]+)\|'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -552,13 +552,13 @@ def scrape(func):
|
||||
if patronNext and inspect.stack()[1][3] not in ['newest'] and len(inspect.stack()) > 2 and inspect.stack()[2][3] not in ['get_channel_results']:
|
||||
nextPage(itemlist, item, data, patronNext, function)
|
||||
|
||||
for it in itemlist:
|
||||
if it.contentEpisodeNumber and it.contentSeason:
|
||||
it.title = '[B]{:d}x{:02d} - {}[/B]'.format(it.contentSeason, it.contentEpisodeNumber, it.infoLabels['title'] if it.infoLabels['title'] else it.fulltitle)
|
||||
if it.contentLanguage:
|
||||
it.title += typo(it.contentLanguage, '_ [] color kod')
|
||||
if it.quality:
|
||||
it.title += typo(it.quality, '_ [] color kod')
|
||||
# for it in itemlist:
|
||||
# if it.contentEpisodeNumber and it.contentSeason:
|
||||
# it.title = '[B]{:d}x{:02d} - {}[/B]'.format(it.contentSeason, it.contentEpisodeNumber, it.infoLabels['title'] if it.infoLabels['title'] else it.fulltitle)
|
||||
# if it.contentLanguage:
|
||||
# it.title += typo(it.contentLanguage, '_ [] color kod')
|
||||
# if it.quality:
|
||||
# it.title += typo(it.quality, '_ [] color kod')
|
||||
|
||||
# next page for pagination
|
||||
if pagination and len(matches) > pag * pagination and not search:
|
||||
|
||||
@@ -97,7 +97,7 @@ def process_request_proxy(url):
|
||||
|
||||
data = re.sub('\s(\w+)=(?!")([^<>\s]+)', r' \1="\2"', data)
|
||||
data = re.sub('https://translate\.googleusercontent\.com/.*?u=(.*?)&usg=[A-Za-z0-9_-]+', '\\1', data)
|
||||
data = re.sub('https?://[a-zA-Z0-9-]+' + domain.replace('.', '-') + '\.translate\.goog(/[a-zA-Z0-9#/-]+)', 'https://' + domain + '\\1', data)
|
||||
data = re.sub('https?://[a-zA-Z0-9-]*' + domain.replace('.', '-') + '\.translate\.goog(/[a-zA-Z0-9#/-]+)', 'https://' + domain + '\\1', data)
|
||||
data = re.sub('\s+<', '<', data)
|
||||
data = data.replace('&', '&').replace('https://translate.google.com/website?sl=' + SL + '&tl=' + TL + '&ajax=1&u=', '')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user