Anorov / cloudflare-scrape

A Python module to bypass Cloudflare's anti-bot page.
MIT License
3.36k stars 458 forks source link

Syntax Errors? #9

Closed Licht9091 closed 9 years ago

Licht9091 commented 9 years ago

I tried to use this script yesterday and I keep getting these kinds of errors

SyntaxError: SyntaxError: Unexpected token } ( @ 1 : 68 ) -> toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\s)"+t[3]+"(?:\s|$)")),t},ot=funct

I believe the "builder" part of the script is searching and returning the wrong challenge and or answer but I am not sure if I am correct and have no idea what part of the page is meant to be returned in this case.

The code I am executing is given below:

url = "http://kissmanga.com/" scraper = create_scraper() scraper.get(url)

Any help with regards to what is wrong(Or what I am doing wrong) would be appreciated. Thanks.

zacharyrs commented 9 years ago

Use this code instead.

[TEMPORARILY REMOVED SO AS NOT TO CONFUSE USERS]
zacharyrs commented 9 years ago

I use that for my script which grabs from kissanime and kisscartoon.

Anorov commented 9 years ago

I just pushed a change which should fix this problem by modifying the regex. Could both of you please try pulling the latest version and testing it?

Licht9091 commented 9 years ago

It seems to be working now, thanks for that.