Quote:
Originally Posted by nachalca
Hello, I am from Uruguay, I've just started using calibre.
I am trying to create a recipe for a weakly uruguayan newspaper called Brecha ( www.brecha.com.uy), but I am copletely lost.
The sites require subscription, I've tried use the new york times example
and the Folha do Sao Paulo example, but none of them sees to work here.
Could anybody create a recipe for Brecha ?
Thank you !!
nachalca
|
you can try this code
Code:
import mechanize, urllib
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
cookies = mechanize.CookieJar()
br = mechanize.build_opener(mechanize.HTTPCookieProcessor(cookies))
request = urllib.urlencode([('loginname', self.username), ('password', self.password),])
response = br.open('http://www.brecha.com.uy/index.php/acceder-miembros', request)
return br
does it works?