Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2012, 05:51 PM   #1
nachalca
Junior Member
nachalca began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2012
Device: kindle
Recipe request from uruguay

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
nachalca is offline   Reply With Quote
Old 08-16-2012, 10:58 PM   #2
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Send me your credentials in private message and I will do it.
kiklop74 is offline   Reply With Quote
Advert
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
Old 08-17-2012, 11:21 AM   #4
nachalca
Junior Member
nachalca began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2012
Device: kindle
thanks a lot for the responses !!
Irui, your suggestion does not work completely. I am not getting the error message but I can not see the complete articles. Is like I don't have a subscription for the website.


I guess probably the error is in other place, here is the recipe using your sugestion :

from calibre.web.feeds.recipes import BasicNewsRecipe
import mechanize, urllib

class General(BasicNewsRecipe):
title = u'brecha'
description = 'La brecha en tinta electronica'
language = 'es'
timefmt = '[%a, %d %b, %Y]'
needs_subscription = True
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
remove_tags_before = dict(id='article')
remove_tags_after = dict(id='article')


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.HTTPCookieProcess or(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

feeds = [(u'tapa', u'www.brecha.com.uy/index.php/component/phocagallery/category/1-tapas?format=feed&type=rss'), (u'Politica', u'http://www.brecha.com.uy/index.php/politica-uruguaya?format=feed&type=rss'), (u'Internacionales', u'http://www.brecha.com.uy/index.php/mundo?format=feed&type=rss'), (u'Cultura', u'http://www.brecha.com.uy/index.php/cultura?format=feed&type=rss'), (u'cultura1', u'http://www.brecha.com.uy/index.php/cultura/vueltas-de-montevideo?format=feed&type=rss'), (u'cultura2', u'http://www.brecha.com.uy/index.php/cultura/secos-y-mojados?format=feed&type=rss'), (u'literarias', u'http://www.brecha.com.uy/index.php/cultura/literarias?format=feed&type=rss'), (u'Sociedad', u'http://www.brecha.com.uy/index.php/sociedad?format=feed&type=rss'), (u'Especiales', u'http://www.brecha.com.uy/index.php/especiales?format=feed&type=rss'), (u'Contratapa', u'http://www.brecha.com.uy/index.php/contratapa?format=feed&type=rss')]
nachalca is offline   Reply With Quote
Old 08-17-2012, 11:27 AM   #5
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
Quote:
Originally Posted by nachalca View Post
thanks a lot for the responses !!
Irui, your suggestion does not work completely. I am not getting the error message but I can not see the complete articles. Is like I don't have a subscription for the website.


I guess probably the error is in other place, here is the recipe using your sugestion :

from calibre.web.feeds.recipes import BasicNewsRecipe
import mechanize, urllib

class General(BasicNewsRecipe):
title = u'brecha'
description = 'La brecha en tinta electronica'
language = 'es'
timefmt = '[%a, %d %b, %Y]'
needs_subscription = True
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
remove_tags_before = dict(id='article')
remove_tags_after = dict(id='article')


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.HTTPCookieProcess or(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

feeds = [(u'tapa', u'www.brecha.com.uy/index.php/component/phocagallery/category/1-tapas?format=feed&type=rss'), (u'Politica', u'http://www.brecha.com.uy/index.php/politica-uruguaya?format=feed&type=rss'), (u'Internacionales', u'http://www.brecha.com.uy/index.php/mundo?format=feed&type=rss'), (u'Cultura', u'http://www.brecha.com.uy/index.php/cultura?format=feed&type=rss'), (u'cultura1', u'http://www.brecha.com.uy/index.php/cultura/vueltas-de-montevideo?format=feed&type=rss'), (u'cultura2', u'http://www.brecha.com.uy/index.php/cultura/secos-y-mojados?format=feed&type=rss'), (u'literarias', u'http://www.brecha.com.uy/index.php/cultura/literarias?format=feed&type=rss'), (u'Sociedad', u'http://www.brecha.com.uy/index.php/sociedad?format=feed&type=rss'), (u'Especiales', u'http://www.brecha.com.uy/index.php/especiales?format=feed&type=rss'), (u'Contratapa', u'http://www.brecha.com.uy/index.php/contratapa?format=feed&type=rss')]
sorry,my fault
I will try it again tomorrow, it's time to go to sleep

Last edited by lrui; 08-17-2012 at 11:38 AM.
lrui is offline   Reply With Quote
Advert
Old 08-18-2012, 11:00 AM   #6
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
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 download news from your website without login

Spoiler:
from calibre.web.feeds.recipes import BasicNewsRecipe class General(BasicNewsRecipe):
title = u'brecha'
description = u'La brecha en tinta electronica'
language = 'es'
timefmt = '[%a, %d %b, %Y]'
oldest_article = 7
max_articles_per_feed = 100
auto_cleanup = True
remove_tags_before = dict(id='article')
remove_tags_after = dict(id='article')
feeds = [
(u'tapa', u'http://www.brecha.com.uy/index.php/component/phocagallery/category/1-tapas?format=feed&type=rss'),
(u'Politica', u'http://www.brecha.com.uy/index.php/politica-uruguaya?format=feed&type=rss'),
(u'Internacionales', u'http://www.brecha.com.uy/index.php/mundo?format=feed&type=rss'),
(u'Cultura', u'http://www.brecha.com.uy/index.php/cultura?format=feed&type=rss'),
(u'cultura1', u'http://www.brecha.com.uy/index.php/cultura/vueltas-de-montevideo?format=feed&type=rss'),
(u'cultura2', u'http://www.brecha.com.uy/index.php/cultura/secos-y-mojados?format=feed&type=rss'),
(u'literarias', u'http://www.brecha.com.uy/index.php/cultura/literarias?format=feed&type=rss'),
(u'Sociedad', u'http://www.brecha.com.uy/index.php/sociedad?format=feed&type=rss'),
(u'Especiales', u'http://www.brecha.com.uy/index.php/especiales?format=feed&type=rss'),
(u'Contratapa', u'http://www.brecha.com.uy/index.php/contratapa?format=feed&type=rss')
]
lrui is offline   Reply With Quote
Old 08-18-2012, 05:31 PM   #7
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Recipe for Brecha Digital was added to Calibre tracker. It will be included in the next release. Optional credential entry is provided.

https://bugs.launchpad.net/calibre/+bug/1038516
kiklop74 is offline   Reply With Quote
Old 08-18-2012, 06:04 PM   #8
nachalca
Junior Member
nachalca began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2012
Device: kindle
OOhh !! Thanks a lot kiklop74 !!
nachalca is offline   Reply With Quote
Reply

Tags
recipe request, uruguay


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
recipe request scifiguy51 Recipes 0 09-07-2011 03:25 PM
recipe request chell1948 Recipes 1 06-02-2011 01:23 PM
Recipes from newspaper and magazines - Spanish | Uruguay zeener Recipes 5 11-24-2010 04:18 PM
Request for recipe sumper Recipes 2 10-11-2010 02:25 AM
Recipe request please aessedai44 Recipes 2 10-06-2010 01:07 AM


All times are GMT -4. The time now is 12:00 AM.


MobileRead.com is a privately owned, operated and funded community.