Thread: Referrer Help
View Single Post
Old 07-23-2012, 01:33 PM   #3
yoss15
Enthusiast
yoss15 began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jul 2011
Device: Kindle
Yeah but it doesn't seem to go in any order. Its not like the first so many work and the rest stop working, so I'm wondering if there is someway to do it in two sessions or more, allowing it work.

Here is the code for the referer:

Code:
    def get_browser(self):
        br = BasicNewsRecipe.get_browser(self)
        cookies = mechanize.CookieJar()
        br = mechanize.build_opener(mechanize.HTTPCookieProcessor(cookies))
        br.addheaders = [('Referer','http://www."referralsite".com')]
        return br
Just replace "referralsite" with what you want the referer to be.
yoss15 is offline   Reply With Quote