aggiornato cloudscraper

This commit is contained in:
marco
2020-05-04 18:28:28 +02:00
parent 8cd92ee71f
commit a16d777fc4
4 changed files with 7215 additions and 20 deletions
@@ -9,15 +9,13 @@ def template(body, domain):
try:
js = re.search(
r'setTimeout\(function\(\){\s+(var s,t,o,p,b,r,e,a,k,i,n,g,f.+?\r?\n[\s\S]+?a\.value =.+?)\r?\n',
body
r'setTimeout\(function\(\){\s+(.*?a\.value = \S+)',
body,
re.M | re.S
).group(1)
except Exception:
raise ValueError('Unable to identify Cloudflare IUAM Javascript on website. {}'.format(BUG_REPORT))
js = re.sub(r'\s{2,}', ' ', js, flags=re.MULTILINE | re.DOTALL).replace('\'; 121\'', '')
js += '\na.value;'
jsEnv = '''
String.prototype.italics=function(str) {{return "<i>" + this + "</i>";}};
var document = {{