Skip to content Skip to sidebar Skip to footer

Mechanize Python And Addheader Method - How Do I Know The Newest Headers?

Currently, I'm using mechanize like this: browser = mechanize.Browser() browser.set_handle_robots(False) browser.set_handle_equiv(False) browser.ad

Solution 1:

Why do you need always the newest Useragent in your Fake-Header? Sites will not block you for using an older browser in most cases. So it would be sufficient to update from time to time (or not at all. Often its enough to add "Mozilla" to the front of the UA-string to get a response as a browser gets).

Another answer would be if you have a webserver running, get some random (non-bot) string from your http-logs.

Solution 2:

Visit http://www.useragentstring.com/pages/useragentstring.php for a list of current browser User-Agent strings. It can also automatically detect and explain your current browser's User-Agent details if you click on home.

You may also paste User-Agent strings to have them explained to you.

I had your same question in mind and stumbled upon that website just now. I got there by googling a User-Agent string, Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1'.

Happy coding!

Post a Comment for "Mechanize Python And Addheader Method - How Do I Know The Newest Headers?"