Setting referrer using urllib

Thomas Weholt thomas at cintra.no
Mon Jul 24 04:44:09 EDT 2000


Hi,

I`m trying to access various search interfaces on online sites using
urllib, contrstructing a url, opening the location and reading the
output, but many of them, well, most of them, return some permission
denied response. Somebody told me this was due to the fact that urllib
didn't have referrer set correctly, so the site wouldn't allow it.

( If this should be allowed is another matter, not what I want to
discuss here. ;-> )

In urllib.py I didn't see anything about referrer. If anybody has done
similar things before, feel free to give hints and clues.

And if making eh ... alternative search-methods for online-resources
is bad in some way, I understand that most of them rely on advertising
etc., let me know about that also. Trying not to step on too many toes
here.

Thomas



More information about the Python-list mailing list