Changeset 44469
- Timestamp:
- 01/01/20 21:45:36 (4 years ago)
- Location:
- titan/mediathek/localhoster
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/cloudflare.py
r44468 r44469 6 6 import lib.common as common 7 7 import re 8 import cookielib 9 from lib.cCFScrape import cCFScrape 10 #from lib.cloudflare import cloudflare 8 11 import lib.cloudflare as cloudflare 12 #from lib.cCFScrape import cCFScrape 9 13 10 14 class CloudflareResolver(object): … … 12 16 self.net = Net(cookie_file='/mnt/network/cookies', http_debug=True, cloudflare=True) 13 17 # self.net = Net(cookie_file='/mnt/network/cookies', cloudflare=True) 18 14 19 url = str(sys.argv[1]) 15 20 return self.get_answer_code(url) … … 24 29 'Content-Type': 'text/html; charset=utf-8'} 25 30 26 # html = self.net.http_GET(web_url, headers=headers).content27 # #html = self.request(web_url, cookie_file=/mnt/network/cookies, cloudflare=True)28 # ret = self.net.save_cookies('/mnt/network/cookies')29 # print "html", html.encode('utf8')30 31 31 CF = cloudflare.CloudflareBypass() 32 32 html = CF.GetHtml(web_url) 33 ret = self.net.save_cookies('/mnt/network/cookies') 34 33 35 print CF.GetReponseInfo() 34 print "html", html 36 37 try: 38 print "html", html.encode('utf8') 39 except: 40 print html 35 41 36 42 sys.stdout = CloudflareResolver() 37 43 38 -
titan/mediathek/localhoster/lib/common.py
r44466 r44469 34 34 #has_addon = kodi.has_addon 35 35 36 profilePath = "/ tmp/pro"36 profilePath = "/mnt/network" 37 37 38 38 RAND_UA = get_ua()
Note: See TracChangeset
for help on using the changeset viewer.