wileyalt / kissanime_dl

web-crawler / package manager / kissanime downloader
MIT License
24 stars 7 forks source link

CloudFlare JS Error #11

Closed ChiselTip closed 8 years ago

ChiselTip commented 8 years ago

Platform: Linux (to be exact, Raspbian GNU/Linux 8) Python Version: 2 Program Version: 1.8.4 Searching for episode: Episode-008 Warning: KissCartoon and KissAsian tend to ask for capcha after 5 video intervals. Started session at https://kissanime.to/Anime/[......] Waiting for authentication... Should take about 4 seconds Uh oh, an error occurred. Go to https://github.com/wileyyugioh/kissanime_dl to report bugs. Caught Error: RuntimeError('Converting the CloudFlare JS has changed!',)

I tested getting the contents (just the html) of the same page using cloudflare-scrape and had no problems getting in.

I am not seeing the same behaviour on KissCartoon.

ChiselTip commented 8 years ago

Further testing, commenting out the following "fixes" the error:

if(form_get.url != js_var_t_href):
    raise RuntimeError("Converting the CloudFlare JS has changed!")
hex007 commented 8 years ago

@ChiselTip are you able to visit the kissanime website? JS changes on the website has rendered it unusable on linux/firefox

Duplicate of #9 ?

ChiselTip commented 8 years ago

I'm running a headless linux box, so I can't speak to Firefox on Linux. I'm having no issues with Firefox on Mac.

The problem seems to be the (above) check.

form_get.url = http://kissanime.to/ whereas js_var_t_href = https://kissanime.to/

Possibly a duplicate.

hex007 commented 8 years ago

@ChiselTip can you submit a pull request?

@wileyyugioh Did you check using kissanime_dl ? The website loads on my phone but not on Linux Firefox, have no idea why.

Is the approach taken by ChiselTip correct?

wileyyugioh commented 8 years ago

I found the way of comparing form get and js_var_t to be inaccurate, as even sending wrong data to the url returns the same url. I have since changed it, and the comparison doesn't even take place anymore. See if https://github.com/wileyyugioh/kissanime_dl/commit/4724ba35f388662fb8cd84839a51568bf1a81828 fixes the problem.

hex007 commented 8 years ago

@wileyyugioh How do I test it. Pip has only releases. how to install manually?

edit: sudo -H python setup.py install

wileyyugioh commented 8 years ago

download the directory, cd to it, and

pip install .
ChiselTip commented 8 years ago

I installed and tested on the same environment as above. This looks to have fixed the issue.

Neglected to mention that I tested on kisscartoon and kissanime. Both tested ok.

hex007 commented 8 years ago

Then you should close the issue