View Single Post
Old 09-26-2010, 12:36 PM   #3
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by Starson17 View Post
What makes you think the page the NFL sends you has pcard or iframe?
edit: Hint - the page that FireFox or IE gets sent is not necessarily the same as what Calibre is sent. It's time to get out TamperData.
Okay, I downloaded Tamperdata (not 100 percent certain how to use it yet), but when I clicked on the print button for the article I seen a listing that has referrers listed.

Referer=http://www.nfl.com/news/story/09000d5d81acc392/article/broncos-rb-moreno-out-vs-colts-buckhalter-expected-to-start

That referer looks like nothing more than the current url. I then took and tried to figure this out and noticed you had a conversation with Kovid about this. So could you help me or maybe explain to me how to go about using this (or would i )?

Spoiler:

Code:
def get_browser(self):
      br = BasicNewsRecipe.get_browser(self)
      orig_open_novisit = br.open_novisit

      def my_open_no_visit(url, **kwargs):
       req = mechanize.Request(url, headers = {'Referer':'http://referer_site.com/'})
       return orig_open_novisit(req)
      
     br.open_novisit = my_open_no_visit
     return br


My first thought was to simply take in the
req = mechanize.Request(url, headers = {'Referer':'http://referer_site.com/'})
and change it to :
req = mechanize.Request(url, headers = {'Referer':url}) but i don't think that is right.

thanks by the way.
TonytheBookworm is offline   Reply With Quote