View Single Post
Old 08-17-2012, 08:39 AM   #3
lrui
Enthusiast
lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.lrui ought to be getting tired of karma fortunes by now.
 
lrui's Avatar
 
Posts: 49
Karma: 475062
Join Date: Aug 2012
Device: nook simple touch
Smile

Quote:
Originally Posted by nachalca View Post
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?
lrui is offline   Reply With Quote