View Single Post
Old 01-06-2012, 01:05 PM   #3
kiavash
Old Linux User
kiavash began at the beginning.
 
Posts: 36
Karma: 12
Join Date: Jan 2012
Device: NST
I modified get_browser and tried to set a cookie policy and still I get the same result. It didn't login. What is happening?

Spoiler:
PHP Code:
   def get_browser(self):
        
br BasicNewsRecipe.get_browser()
        
policy cookielib.DefaultCookiePolicy(allowed_domains=['.omeda.com','omeda.com','mwjournal.com','.mwjournal.com'])
        
cjar   cookielib.CookieJar(policy)
        
br.set_cookiejar(cjar)
        if 
self.username is not None and self.password is not None:
            
br.open('http://www.omeda.com/cgi-win/mwjreg.cgi?m=login')
            
br.select_form(nr 0)
            
br['EMAIL_ADDRESS']   = self.username
            br
['PASSWORD'] = self.password
            br
.submit('submitButtonName')
        return 
br 


Is there a way to dump all the HTML communication out to a file or folder, to see if the login is successful and it moved to fetch the articles after login? I know about --debug but that only dumpt the HTML of the RSS articles. How about to dump def get_browser(self): output to a file?
kiavash is offline   Reply With Quote