Your implementation seems beautiful ... and should work.
It should be sent in the correct cookies
, but I see it as a case when the site does not actually register you.
How can you say that it does not send cookies
or there may be cookies
that you receive, not the one that checks you.
Use: response.info()
to view the response headers to see which cookies you actually receive.
The site cannot register you because:
He has a check on the User-agent
, which you do not install, since some sites open from 4 main browsers only to restrict access to the bot.
The site may look for some special hidden form field that you cannot submit.
1 tip:
from urllib import urlencode
Moreover, it is strange here:
- You pass the md5 password before sending. (Strange)
- This is usually done by the server before comparing with the database.
- This is only possible if
site.com
implements md5 in javascript. - This is a very rare case, as it can only be 0.01% of websites.
- Verify that this can be a problem and you provide a hashed form, not an actual password for the server.
- So, the server will compute md5 again for your md5 hash.
Departure..!! :)
source share