premek / slimrat

Automatically exported from code.google.com/p/slimrat
MIT License
1 stars 1 forks source link

plugin UlozTo #154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Does not work for me.
It shows everytime captcha image from this URL ...

http://img.uloz.to/captcha/3799.png

Original issue reported on code.google.com by tomas.bk...@gmail.com on 30 May 2010 at 10:29

GoogleCodeExporter commented 9 years ago
I tried to solve this problem. Now it works for me ... see attached file.

Original comment by tomas.bk...@gmail.com on 2 Jun 2010 at 11:17

Attachments:

GoogleCodeExporter commented 9 years ago
And the procedure ocr_postprocess() probaly should finnaly return recognized 
string:

 return if $captcha !~ /^\w{4}$/;
 return $_;
 }

But the OCR doesn't works fine here (0% succesibilty), so it doesn't matter...

Original comment by tomas.bk...@gmail.com on 2 Jun 2010 at 11:46

GoogleCodeExporter commented 9 years ago
Thanks
I included your fix, it helps.

But it still needs to check if the entered captcha is not wrong and dont 
download HTML page.

And it looks that captcha images are static, they are changing after some 
longer time (months?) so I think it should be good to somehow cache the 
chaptcha answer to let the user enter it once and download many times.

Original comment by premysl....@gmail.com on 10 Jun 2010 at 9:42

GoogleCodeExporter commented 9 years ago
May be I'l try do some more experiments with it and try to improve it.

Windows "Universal Share Downloader" is able with one captacha response 
donwload few hours ... so it is posible.

Original comment by tomas.bk...@gmail.com on 10 Jun 2010 at 10:00

GoogleCodeExporter commented 9 years ago
captcha caching is not a problem,
but i dont know how to check if captcha is entered right

Original comment by premysl....@gmail.com on 10 Jun 2010 at 10:20

GoogleCodeExporter commented 9 years ago
May be could work solution used in CZshare plugin ... parse response after 
captcha submmission, when it is HTML page with some string, ask captcha again.

But in CZhare there is one extra web form with download button, on UlozTo 
starts download directly after captcha sumission ...

Original comment by tomas.bk...@gmail.com on 10 Jun 2010 at 11:28

GoogleCodeExporter commented 9 years ago
So to check, if captcha was correct you can simply check response content type 
... see atached plugin.

Original comment by tomas.bk...@gmail.com on 10 Jun 2010 at 11:34

Attachments:

GoogleCodeExporter commented 9 years ago
But it downloads the file two times (first only to check if captcha is right, 
second real download)? It's not what we want to do with bigger files. We must 
know if captcha is right _before_ the download. (dont know if it is possible)

I experimented with HEAD method of request but with no results.

Original comment by premysl....@gmail.com on 11 Jun 2010 at 1:21

GoogleCodeExporter commented 9 years ago
I think, when you remove second parameter in in first calling of 
{MECH}->request(),
which we use just for testing reponse, then the problem with multiple download 
files disapear ...

I'l try do more exploration and final version of plugin soon (with saving of 
captcha answer for multiple answers).

Original comment by tomas.bk...@gmail.com on 17 Jun 2010 at 11:03

GoogleCodeExporter commented 9 years ago
So, here is my final version of the plugin.

It should now ask for captcha repeatly until it is correct. It should ask just 
for first file in queue and then reuse the response.

I didn't test, how many times is one captcha answer reusable, but at least few 
hours it should work ... they probably regenerate images in some time interval.

Original comment by tomas.bk...@gmail.com on 22 Jun 2010 at 10:26

Attachments:

GoogleCodeExporter commented 9 years ago
This trick with remembering the captcha is nice, but now i tried it and it 
doesnt seems to work, maybe they changed it somehow.

Closing this issue now, I hope this plugin is now fixed, see Issue 159 

Original comment by premysl....@gmail.com on 10 Jan 2011 at 1:50