srid99 / einthusan-dl

A utility script to download movies from einthusan.tv
37 stars 21 forks source link

ERROR:root:Unhandled exception: 'NoneType' object is not callable #3

Closed d3cxxxx closed 9 years ago

d3cxxxx commented 10 years ago

When I try to test the script, I get the error: ERROR:root:Unhandled exception: 'NoneType' object is not callable

I picked the following URL to test: "http://www.einthusan.com/movies/watch.php?telugumoviesonline=Veeraa&lang=telugu&id=3014"

And used it raw, with --curl and with --wget, with the same issue.

Mind checking this?

srid99 commented 10 years ago

Is it possible to post the complete command you used ? That might help me to reproduce it.

Eg: einthusan-dl http://www.einthusan.com/movies/watch.php?telugumoviesonline=Veeraa&lang=telugu&id=3014 --wget

This might help me in debugging the issue.

d3cxxxx commented 10 years ago

./einthusan-dl "http://www.einthusan.com/movies/watch.php?telugumoviesonline=Veeraa&lang=telugu&id=3014" --curl ./einthusan-dl "http://www.einthusan.com/movies/watch.php?telugumoviesonline=Veeraa&lang=telugu&id=3014" --wget ./einthusan-dl "http://www.einthusan.com/movies/watch.php?telugumoviesonline=Veeraa&lang=telugu&id=3014"

srid99 commented 10 years ago

Thanks. I will give a try.

Between is this first time you are trying to use it or suddenly it stopped working ?

d3cxxxx commented 10 years ago

Used it a while ago without issues, but trying it after a long break.

srid99 commented 10 years ago

Right. Seems like they introduced a security check (asking for captcha code) to avoid bots (like this download utility) which is good ;). Thus the requests are not processed. Now we have to bypass this check which should be possible.

How urgent you need this ?

d3cxxxx commented 10 years ago

As soon as you find time. :) Also, how did you figure that they introduced a captcha? Once this failed I tried the brute force way downloading the mp4 directly using wget or curl, but got a 404 instead.

srid99 commented 10 years ago

I just went to their webpage and immediately got redirected to cloudfare security check (asking for Captcha code). Weren't you asked for it ? Not sure if it is location based. Also I didn't get the error you got. I got a 403 when I tried the command you used.

srid99 commented 10 years ago

One more thing can you run the command with "--debug" enabled ?

d3cxxxx commented 10 years ago

I did not get asked for captcha. Same result with --debug too. Is the usage correct?

$ ./einthusan-dl --debug "http://www.einthusan.com/movies/watch.php?telugumoviesonline=Veeraa&lang=telugu&id=3014" --wget ERROR:root:Unhandled exception: 'NoneType' object is not callable $

srid99 commented 10 years ago

You have a different issue. Seems like it didn't even pass the argument parsing. It breaks even before that. Which version of python are you using ? Also your operating system ?

Just to make sure it is not the issue with cloudfare (I am almost sure it is not) can you do a 'curl' for the url you posted and can you check if it has contents from the einthusan site and not related to cloudfare ?

d3cxxxx commented 10 years ago

$ python --version Python 2.7.6

OS: Lubuntu (Ubuntu with LXDE instead of Gnome/KDE)

d3cxxxx commented 10 years ago

$ wget 'http://173.192.200.82/movies_telugu/movie_high/3014.mp4?st=bzC4yF-zGlI-LE_tCdCxCQ&e=1415932832' --2014-11-13 13:49:00-- http://173.192.200.82/movies_telugu/movie_high/3014.mp4?st=bzC4yF-zGlI-LE_tCdCxCQ&e=1415932832 Connecting to 173.192.200.82:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1684651924 (1.6G) [video/mp4] Saving to: ‘3014.mp4?st=bzC4yF-zGlI-LE_tCdCxCQ&e=1415932832.1’

1% [=> ] 17,751,583 521KB/s eta 53m 37s

Seems to be working if I use wget directly (using the actual URL to the mp4 file). Let me try with curl too.

ghost commented 9 years ago

Broken again. It looks like they are now dynamically getting the movie url.

srid99 commented 9 years ago

@krackers You are correct. Seems like they do a lookup for the video URL.

They use this API http://cdn.einthusan.com/geturl/{movie-id}/hd/London%2CToronto%2CDallas%2CWashington%2CSan%2CSydney/ to get the video to be downloaded.

Actually they made our work easy. No need for screen scrapping just use their API :P

srid99 commented 9 years ago

@krackers Fixed. Can you try now ?

ghost commented 9 years ago

@srid99 Yeah I looked at the page requests and saw the same. Haven't tested your implementation but it should work fine.

Nice of them to provide the api though! :D

srid99 commented 9 years ago

Closing the issue then..