domini CF dinamici (by alfa), aggiornamento url
This commit is contained in:
+43
-44
@@ -1,47 +1,46 @@
|
|||||||
{
|
{
|
||||||
"altadefinizione01": "https://altadefinizione01.photo",
|
"altadefinizione01": "https://altadefinizione01.photo",
|
||||||
"altadefinizione01_link": "https://altadefinizione01.gallery",
|
"altadefinizione01_link": "https://altadefinizione01.gallery",
|
||||||
"altadefinizioneclick": "https://altadefinizione.studio",
|
"altadefinizioneclick": "https://altadefinizione.family",
|
||||||
"animeforce": "https://ww1.animeforce.org",
|
"animeforce": "https://ww1.animeforce.org",
|
||||||
"animeleggendari": "https://animepertutti.org",
|
"animeleggendari": "https://animepertutti.org",
|
||||||
"animesaturn": "https://www.animesaturn.com",
|
"animesaturn": "https://www.animesaturn.com",
|
||||||
"animestream": "https://www.animeworld.it",
|
"animestream": "https://www.animeworld.it",
|
||||||
"animesubita": "http://www.animesubita.org",
|
"animesubita": "http://www.animesubita.org",
|
||||||
"animetubeita": "http://www.animetubeita.com",
|
"animetubeita": "http://www.animetubeita.com",
|
||||||
"animeunity": "https://www.animeunity.it",
|
"animeunity": "https://www.animeunity.it",
|
||||||
"animeworld": "https://www.animeworld.tv",
|
"animeworld": "https://www.animeworld.tv",
|
||||||
"casacinema": "https://www.casacinema.me",
|
"casacinema": "https://www.casacinema.digital",
|
||||||
"casacinemaInfo": "https://casacinema.life",
|
"casacinemaInfo": "https://casacinema.life",
|
||||||
"cb01anime": "https://www.cineblog01.network",
|
"cb01anime": "https://www.cineblog01.network/",
|
||||||
"cineblog01": "https://cb01-nuovo-indirizzo.info",
|
"cinemalibero": "https://cinemalibero.plus",
|
||||||
"cinemalibero": "https://cinemalibero.plus",
|
"cinetecadibologna": "http://cinestore.cinetecadibologna.it",
|
||||||
"cinetecadibologna": "http://cinestore.cinetecadibologna.it",
|
"dreamsub": "https://dreamsub.stream",
|
||||||
"dreamsub": "https://dreamsub.stream",
|
"dsda": "https://www.dsda.press/",
|
||||||
"dsda": "https://www.dsda.press/",
|
"fastsubita": "https://fastsubita.online",
|
||||||
"fastsubita": "https://fastsubita.online",
|
"filmgratis": "https://www.filmaltadefinizione.tv",
|
||||||
"filmgratis": "https://www.filmaltadefinizione.tv",
|
"filmigratis": "https://filmigratis.org",
|
||||||
"filmigratis": "https://filmigratis.org",
|
"filmsenzalimiticc": "https://www.filmsenzalimiti.estate",
|
||||||
"filmsenzalimiticc": "https://www.filmsenzalimiti.estate",
|
"filmstreaming01": "https://filmstreaming01.com",
|
||||||
"filmstreaming01": "https://filmstreaming01.com",
|
"guardaserie_stream": "https://guardaserie.store",
|
||||||
"guardaserie_stream": "https://guardaserie.store",
|
"guardaserieclick": "https://www.guardaserie.style",
|
||||||
"guardaserieclick": "https://www.guardaserie.band",
|
"hd4me": "https://hd4me.net",
|
||||||
"hd4me": "https://hd4me.net",
|
"ilgeniodellostreaming": "https://ilgeniodellostreaming.tw",
|
||||||
"ilgeniodellostreaming": "https://ilgeniodellostreaming.tk",
|
"italiaserie": "https://italiaserie.org",
|
||||||
"italiaserie": "https://italiaserie.org",
|
"mondoserietv": "https://mondoserietv.com",
|
||||||
"mondoserietv": "https://mondoserietv.com",
|
"netfreex": "https://www.netfreex.club",
|
||||||
"netfreex": "https://www.netfreex.club",
|
"piratestreaming": "https://www.piratestreaming.biz",
|
||||||
"piratestreaming": "https://www.piratestreaming.online",
|
"polpotv": "https://polpotv.club",
|
||||||
"polpotv": "https://polpotv.club",
|
"pufimovies": "https://pufimovies.com",
|
||||||
"pufimovies": "https://pufimovies.com",
|
"raiplay": "https://www.raiplay.it",
|
||||||
"raiplay": "https://www.raiplay.it",
|
"seriehd": "https://seriehd.net",
|
||||||
"seriehd": "https://seriehd.net",
|
"serietvonline": "https://serietvonline.host",
|
||||||
"serietvonline": "https://serietvonline.host",
|
"serietvsubita": "http://serietvsubita.xyz",
|
||||||
"serietvsubita": "http://serietvsubita.xyz",
|
"serietvu": "https://www.serietvu.link",
|
||||||
"serietvu": "https://www.serietvu.link",
|
"streamingaltadefinizione": "https://www.popcornstream.press",
|
||||||
"streamingaltadefinizione": "https://www.popcornstream.website/",
|
"streamtime": "https://t.me/s/StreamTime",
|
||||||
"streamtime": "https://t.me/s/StreamTime",
|
"tantifilm": "https://www.tantifilm.pizza",
|
||||||
"tantifilm": "https://www.tantifilm.bar",
|
"toonitalia": "https://toonitalia.org",
|
||||||
"toonitalia": "https://toonitalia.org",
|
"vedohd": "https://vedohd.uno",
|
||||||
"vedohd": "https://vedohd.uno",
|
|
||||||
"vvvvid": "https://www.vvvvid.it"
|
"vvvvid": "https://www.vvvvid.it"
|
||||||
}
|
}
|
||||||
+37
-12
@@ -41,12 +41,23 @@ if HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT == 0: HTTPTOOLS_DEFAULT_DOWNLOAD_TIMEOUT =
|
|||||||
# Random use of User-Agents, if nad is not specified
|
# Random use of User-Agents, if nad is not specified
|
||||||
HTTPTOOLS_DEFAULT_RANDOM_HEADERS = False
|
HTTPTOOLS_DEFAULT_RANDOM_HEADERS = False
|
||||||
|
|
||||||
domainCF = list()
|
# old
|
||||||
channelsCF = ['guardaserieclick', 'casacinema', 'dreamsub', 'ilgeniodellostreaming', 'piratestreaming', 'altadefinizioneclick', 'altadefinizione01_link']
|
# domainCF = list()
|
||||||
otherCF = ['altadefinizione-nuovo.link', 'akvideo.stream', 'backin.net', 'vcrypt.net']
|
# channelsCF = ['guardaserieclick', 'ilgeniodellostreaming']
|
||||||
for ch in channelsCF:
|
# otherCF = ['akvideo.stream', 'backin.net', 'vcrypt.net']
|
||||||
domainCF.append(urlparse.urlparse(config.get_channel_url(name=ch)).hostname)
|
# for ch in channelsCF:
|
||||||
domainCF.extend(otherCF)
|
# domainCF.append(urlparse.urlparse(config.get_channel_url(name=ch)).hostname)
|
||||||
|
# domainCF.extend(otherCF)
|
||||||
|
|
||||||
|
global CF_LIST
|
||||||
|
CF_LIST = list()
|
||||||
|
CF_LIST_PATH = os.path.join(config.get_data_path(), "CF_Domains.txt")
|
||||||
|
|
||||||
|
if os.path.exists(CF_LIST_PATH):
|
||||||
|
with open(CF_LIST_PATH, "rb") as CF_File:
|
||||||
|
CF_LIST = CF_File.read().splitlines()
|
||||||
|
|
||||||
|
FORCE_CLOUDSCRAPER_LIST = ['akvideo.stream']
|
||||||
|
|
||||||
def get_user_agent():
|
def get_user_agent():
|
||||||
# Returns the global user agent to be used when necessary for the url.
|
# Returns the global user agent to be used when necessary for the url.
|
||||||
@@ -257,14 +268,20 @@ def downloadpage(url, **opt):
|
|||||||
"""
|
"""
|
||||||
url = scrapertools.unescape(url)
|
url = scrapertools.unescape(url)
|
||||||
domain = urlparse.urlparse(url).netloc
|
domain = urlparse.urlparse(url).netloc
|
||||||
global domainCF
|
global CF_LIST
|
||||||
CF = False
|
CF = False
|
||||||
if domain in domainCF or opt.get('cf', False):
|
|
||||||
url = 'https://web.archive.org/save/' + url
|
|
||||||
CF = True
|
|
||||||
|
|
||||||
from lib import requests
|
if domain in FORCE_CLOUDSCRAPER_LIST:
|
||||||
session = requests.session()
|
from lib import cloudscraper
|
||||||
|
session = cloudscraper.create_scraper()
|
||||||
|
CF = True
|
||||||
|
else:
|
||||||
|
from lib import requests
|
||||||
|
session = requests.session()
|
||||||
|
|
||||||
|
if domain in CF_LIST or opt.get('CF', False):
|
||||||
|
url = 'https://web.archive.org/save/' + url
|
||||||
|
CF = True
|
||||||
|
|
||||||
if config.get_setting('resolver_dns') and not opt.get('use_requests', False):
|
if config.get_setting('resolver_dns') and not opt.get('use_requests', False):
|
||||||
from specials import resolverdns
|
from specials import resolverdns
|
||||||
@@ -382,6 +399,14 @@ def downloadpage(url, **opt):
|
|||||||
|
|
||||||
response_code = req.status_code
|
response_code = req.status_code
|
||||||
|
|
||||||
|
if req.headers.get('Server', '').startswith('cloudflare') and response_code in [429, 503, 403] and not opt.get('CF', False):
|
||||||
|
if domain not in CF_LIST:
|
||||||
|
opt["CF"] = True
|
||||||
|
with open(CF_LIST_PATH, "a") as CF_File:
|
||||||
|
CF_File.write("%s\n" % domain)
|
||||||
|
logger.debug("CF retry... for domain: %s" % domain)
|
||||||
|
return downloadpage(url, **opt)
|
||||||
|
|
||||||
response['data'] = req.content if req.content else ''
|
response['data'] = req.content if req.content else ''
|
||||||
if CF:
|
if CF:
|
||||||
import re
|
import re
|
||||||
|
|||||||
Reference in New Issue
Block a user