Migliorato support.match e sostituito ove usato
- Fix Animeforce - Fix AnimeSubITA
This commit is contained in:
@@ -10,8 +10,7 @@ __channel__ = "animesaturn"
|
||||
host = support.config.get_setting("channel_host", __channel__)
|
||||
headers={'X-Requested-With': 'XMLHttpRequest'}
|
||||
|
||||
IDIOMAS = {'Italiano': 'ITA'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
list_servers = ['openload', 'fembed', 'animeworld']
|
||||
list_quality = ['default', '480p', '720p', '1080p']
|
||||
|
||||
@@ -67,7 +66,7 @@ def peliculas(item):
|
||||
deflang= 'Sub-ITA'
|
||||
if item.args == 'updated':
|
||||
post = "page=" + str(item.page if item.page else 1) if item.page > 1 else None
|
||||
page, data = support.match(item, r'data-page="(\d+)" title="Next">', post=post, headers=headers)
|
||||
page= support.match(item, patron=r'data-page="(\d+)" title="Next">', post=post, headers=headers).match
|
||||
patron = r'<img alt="[^"]+" src="(?P<thumb>[^"]+)" [^>]+></div></a>\s*<a href="(?P<url>[^"]+)"><div class="testo">(?P<title>[^\(<]+)(?:(?P<lang>\(([^\)]+)\)))?</div></a>\s*<a href="[^"]+"><div class="testo2">[^\d]+(?P<episode>\d+)</div></a>'
|
||||
if page: nextpage = page
|
||||
item.contentType='episode'
|
||||
@@ -85,8 +84,8 @@ def peliculas(item):
|
||||
|
||||
|
||||
def check(item):
|
||||
movie, data = support.match(item, r'Episodi:</b> (\d*) Movie')
|
||||
anime_id = support.match(data, r'anime_id=(\d+)')[0][0]
|
||||
movie = support.match(item, patron=r'Episodi:</b> (\d*) Movie')
|
||||
anime_id = support.match(movie.data, patron=r'anime_id=(\d+)').match
|
||||
item.url = host + "/loading_anime?anime_id=" + anime_id
|
||||
if movie:
|
||||
item.contentType = 'movie'
|
||||
@@ -108,9 +107,9 @@ def episodios(item):
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
urls = support.match(item, r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers)[0]
|
||||
urls = support.match(item, patron=r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers, debug=True).matches
|
||||
if urls:
|
||||
links = support.match(item, r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', url=urls[0], headers=headers)[0]
|
||||
links = support.match(urls[0], patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers).matches
|
||||
for link in links:
|
||||
itemlist.append(
|
||||
support.Item(channel=item.channel,
|
||||
|
||||
Reference in New Issue
Block a user