View Single Post
Old 02-14-2011, 09:12 AM   #7
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by EW1(SG) View Post
I have a problem getting the RSS fed articles from a site where I think the problem is authorization.

Is there a way to see what mechanize and urllib2 are seeing? Following Kovid Goyal's advice to someone else on another thread, I've looked at the Google Reader builtin which appears to have the capability that I'm looking for: to parse an arbitrarily complex login page, but I am not familiar with Python or with the APIs for the methods used and I am having trouble discerning what some of the functions do.

If I could see what the results of each statement were, it would go a long ways to helping me understand what I'm trying to do.

Thanks,
I wrote the authorization portion of Google Reader, and you are right - you need to see the http header handshaking to debug.
After
Code:
def get_browser(self):
    br = BasicNewsRecipe.get_browser()
You need to set the following debug options:
Code:
    # Print HTTP headers. and other debugging messages
    br.set_debug_http(True)
    br.set_debug_redirects(True)
    br.set_debug_responses(True)
Starson17 is offline   Reply With Quote