Fix AnimeUnity, HD4ME, ToonItalia
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@
|
|||||||
"streamtime": "https://t.me/s/StreamTime",
|
"streamtime": "https://t.me/s/StreamTime",
|
||||||
"tantifilm": "https://www.tantifilm.vision",
|
"tantifilm": "https://www.tantifilm.vision",
|
||||||
"tapmovie": "https://it.tapmovie.net",
|
"tapmovie": "https://it.tapmovie.net",
|
||||||
"toonitalia": "https://toonitalia.pro",
|
"toonitalia": "https://toonitalia.co",
|
||||||
"vvvvid": "https://www.vvvvid.it"
|
"vvvvid": "https://www.vvvvid.it"
|
||||||
},
|
},
|
||||||
"findhost": {
|
"findhost": {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
# Canale per AnimeUnity
|
# Canale per AnimeUnity
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
|
from lib.requests.sessions import session
|
||||||
import requests, json, copy, inspect
|
import requests, json, copy, inspect
|
||||||
from core import support
|
from core import support
|
||||||
from platformcode import autorenumber
|
from platformcode import autorenumber
|
||||||
@@ -115,8 +116,10 @@ def news(item):
|
|||||||
support.info()
|
support.info()
|
||||||
item.contentType = 'episode'
|
item.contentType = 'episode'
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
import cloudscraper
|
||||||
|
session = cloudscraper.create_scraper()
|
||||||
|
|
||||||
fullJs = json.loads(support.match(item, headers=headers, patron=r'items-json="([^"]+)"').match.replace('"','"'))
|
fullJs = json.loads(support.match(session.get(item.url).text, headers=headers, patron=r'items-json="([^"]+)"', debug=True).match.replace('"','"'))
|
||||||
js = fullJs['data']
|
js = fullJs['data']
|
||||||
|
|
||||||
for it in js:
|
for it in js:
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ def peliculas(item):
|
|||||||
patron = r'<a title="(?P<title>[^\(]+)\(\s*(?P<year>\d+)\)\s\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?[^"]+"\s*href="(?P<url>[^"]+)'
|
patron = r'<a title="(?P<title>[^\(]+)\(\s*(?P<year>\d+)\)\s\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?[^"]+"\s*href="(?P<url>[^"]+)'
|
||||||
else:
|
else:
|
||||||
patron = r'<a href="(?P<url>[^"]+)" (?:rel="?[0-9]+"?)? title="(?P<title>[^\(]+)(?!\()\s*\((?P<year>\d+)\)\s(?:[^\]]+\])?\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?<img id="?cov"?.*?src="(?P<thumb>[^"]+)'
|
patron = r'<a href="(?P<url>[^"]+)" (?:rel="?[0-9]+"?)? title="(?P<title>[^\(]+)(?!\()\s*\((?P<year>\d+)\)\s(?:[^\]]+\])?\D+(?P<quality>\d+p).{3}(?P<lang>[^ ]+).*?<img id="?cov"?.*?src="(?P<thumb>[^"]+)'
|
||||||
patronNext = r'rel="?next"? href="([^"]+)"'
|
patronNext = r'current(?:[^>]*>){2}\s*<a class="[^"]+"\s* href="([^"]+)'
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"id": "toonitalia",
|
"id": "toonitalia",
|
||||||
"name": "ToonItalia",
|
"name": "ToonItalia",
|
||||||
"language": ["ita", "sub-ita"],
|
"language": ["ita", "sub-ita"],
|
||||||
"active": false,
|
"active": true,
|
||||||
"thumbnail": "toonitalia.png",
|
"thumbnail": "toonitalia.png",
|
||||||
"banner": "toonitalia.png",
|
"banner": "toonitalia.png",
|
||||||
"categories": ["tvshow", "movie", "vos", "anime"],
|
"categories": ["tvshow", "movie", "vos", "anime"],
|
||||||
|
|||||||
+19
-13
@@ -3,7 +3,7 @@
|
|||||||
# Canale per ToonItalia
|
# Canale per ToonItalia
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
from core import support
|
from core import scrapertools, support
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
host = support.config.get_channel_url()
|
host = support.config.get_channel_url()
|
||||||
@@ -76,7 +76,7 @@ def peliculas(item):
|
|||||||
else:
|
else:
|
||||||
patronBlock = '<main[^>]+>(?P<block>.*)</main>'
|
patronBlock = '<main[^>]+>(?P<block>.*)</main>'
|
||||||
# patron = r'<a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>[^>]+>[^>]+>[^>]+><img.*?src="(?P<thumb>[^"]+)".*?<p>(?P<plot>[^<]+)</p>.*?<span class="cat-links">Pubblicato in.*?.*?(?P<type>(?:[Ff]ilm|</artic))[^>]+>'
|
# patron = r'<a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>[^>]+>[^>]+>[^>]+><img.*?src="(?P<thumb>[^"]+)".*?<p>(?P<plot>[^<]+)</p>.*?<span class="cat-links">Pubblicato in.*?.*?(?P<type>(?:[Ff]ilm|</artic))[^>]+>'
|
||||||
patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a>[^>]+>[^>]+>[^>]+><img.*?src="(?P<thumb>[^"]+)".*?<p>(?P<plot>[^<]+)</p>.*?tag">.*?(?P<type>(?:[Ff]ilm|</art|Serie Tv))'
|
patron = r'<a href="(?P<url>[^"]+)" rel="bookmark">(?P<title>[^<]+)</a>(:?[^>]+>){3}(?:<img.*?src="(?P<thumb>[^"]+)")?.*?<p>(?P<plot>[^<]+)</p>.*?tag">.*?(?P<type>(?:[Ff]ilm|</art|Serie Tv))'
|
||||||
typeContentDict={'movie':['film']}
|
typeContentDict={'movie':['film']}
|
||||||
typeActionDict={'findvideos':['film']}
|
typeActionDict={'findvideos':['film']}
|
||||||
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
patronNext = '<a class="next page-numbers" href="([^"]+)">'
|
||||||
@@ -93,21 +93,27 @@ def peliculas(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
anime = True
|
anime = True
|
||||||
data = support.match(item, headers=headers).data
|
def get_ep(item):
|
||||||
if 'https://vcrypt.net' in data:
|
find = ''
|
||||||
patron = r'(?: /> |<p>)(?P<episode>\d+.\d+)?(?: – )?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)'
|
data = support.match(item, headers=headers).data
|
||||||
else:
|
match = support.match(data, patron=r'(?: /> |<p>)(?:(?P<season>\d+)×)?(?P<episode>\d+)(?:\s+–\s+)?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)').matches
|
||||||
patron = r'<br />\s*<a href="(?P<url>[^"]+)" target="_blank" rel="noopener[^>]+>(?P<episode>\d+.\d+)?(?: – )?(?P<title>[^<]+)</a>'
|
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
|
||||||
|
|
||||||
def itemHook(item):
|
data = get_ep(item)
|
||||||
item.title = support.re.sub(r'\[B\]|\[/B\]', '', item.title)
|
patron = r'(?P<episode>[^|]+)\|(?P<title>[^|]+)\|(?P<data>[^|]+)\|'
|
||||||
item.title = item.title.replace('_',' ').replace('–','-').replace('×','x').replace('-','-').replace(' ',' ')
|
|
||||||
item.title = support.re.sub(item.fulltitle + ' - ','',item.title)
|
|
||||||
item.title = support.typo(item.title.strip(' -'),'bold')
|
|
||||||
return item
|
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
||||||
|
|
||||||
|
|
||||||
|
def clean_title(title):
|
||||||
|
title = scrapertools.unescape(title)
|
||||||
|
title = title.replace('_',' ').replace('–','-').replace(' ',' ')
|
||||||
|
title = title.strip(' - ')
|
||||||
|
return title
|
||||||
Reference in New Issue
Block a user