![]() |
#1051 |
Member
![]() Posts: 15
Karma: 10
Join Date: Dec 2009
Location: Cupertino, CA
Device: Kindle 2, iPad
|
override <title> <body> ?
So I'm trying to write the ps3center recipe that was requested here. I've got the python for grabbing the correct "print" version, but the print version html doesn't come back with <title> or <body> which I think ebook-convert is looking for. The html in the print version is quite simple, but I can't figure out how to get it so ebook-convert will like it. Can someone who knows take a look?
Code:
class AdvancedUserRecipe1262158494(BasicNewsRecipe): title = u'PS3Center' oldest_article = 7 max_articles_per_feed = 100 feeds = [(u'PS3 Center', u'http://www.ps3center.net/rss.xml')] def print_version(self, url): article_id = url.split('/')[5] return 'http://www.ps3center.net/print.php?id=' +article_id the print version looks like this: http://www.ps3center.net/print.php?id=4216 |
![]() |
![]() |
#1052 | |
Connoisseur
![]() ![]() Posts: 78
Karma: 192
Join Date: Nov 2009
Device: Sony PRS-600
|
Bad HTML
Quote:
Code:
from calibre.ebooks.BeautifulSoup import BeautifulSoup Code:
def preprocess_html(self, soup): tag = soup.find('td') for attr, value in tag.attrs: del tag[attr] tag.name = 'div' newSoup = BeautifulSoup('<html><head><title></title></head><body></body></html>') newSoup.body.append(tag) return newSoup |
|
![]() |
Advert | |
|
![]() |
#1053 |
Connoisseur
![]() Posts: 83
Karma: 10
Join Date: Aug 2009
Device: iphone, Irex iliad, sony prs950, kindle Dx, Ipad
|
Can any one please make recipe for world in 2010 by the economist. it uses same userid& pass as for the economist.
http://www.economist.com/theworldin/ thanks |
![]() |
![]() |
#1054 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() Posts: 68
Karma: 648
Join Date: Dec 2009
Device: PRS-300
|
Here is a recipe for RTE News from Ireland:
Code:
class AdvancedUserRecipe1262344746(BasicNewsRecipe): title = u'RTE News' oldest_article = 7 max_articles_per_feed = 100 __author__ = u'Robin Phillips' remove_tags = [dict(attrs={'class':['topAd','botad','previousNextItem','headline','footerLinks','footernav']})] feeds = [(u'News', u'http://www.rte.ie/rss/news.xml'), (u'Sport', u'http://www.rte.ie/rss/sport.xml'), (u'Soccer', u'http://www.rte.ie/rss/soccer.xml'), (u'GAA', u'http://www.rte.ie/rss/gaa.xml'), (u'Rugby', u'http://www.rte.ie/rss/rugby.xml'), (u'Racing', u'http://www.rte.ie/rss/racing.xml'), (u'Business', u'http://www.rte.ie/rss/business.xml'), (u'Entertainment', u'http://www.rte.ie/rss/entertainment.xml')] def print_version(self, url): return url.replace('http://www', 'http://m') |
![]() |
![]() |
#1055 |
Member
![]() Posts: 20
Karma: 10
Join Date: Sep 2009
Device: PRS 505
|
Hi evanmaastrigt, the cynewslive works fine for me. I've adapted it for Cyprus Weekly and it's attached.
|
![]() |
Advert | |
|
![]() |
#1056 |
Member
![]() Posts: 20
Karma: 28
Join Date: Aug 2009
Location: Arizona
Device: Kindle, Jetbook
|
Last edited by gatorfan; 01-01-2010 at 10:38 AM. Reason: added URL |
![]() |
![]() |
#1057 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Dec 2009
Device: Kindle
|
I would like a good recipe for the Milwaukee Journal Sentinel. The web address is: http://www.jsonline.com/
Thanks Wayne |
![]() |
![]() |
#1058 |
Connoisseur
![]() ![]() Posts: 78
Karma: 192
Join Date: Nov 2009
Device: Sony PRS-600
|
New recipe for Hindustan Times
|
![]() |
![]() |
#1059 |
Vox calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
|
deleted
Last edited by Krittika Goyal; 01-01-2010 at 03:34 PM. |
![]() |
![]() |
#1060 |
Vox calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
|
|
![]() |
![]() |
#1061 | |
Vox calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
|
Quote:
|
|
![]() |
![]() |
#1062 |
Vox calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
|
|
![]() |
![]() |
#1063 |
Vox calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
|
deleted. sorry just started using mobile read for real. made a couple of mistakes while posting.
Last edited by Krittika Goyal; 01-01-2010 at 07:54 PM. |
![]() |
![]() |
#1064 | |
Connoisseur
![]() Posts: 64
Karma: 30
Join Date: Dec 2009
Device: iPad, Galaxy S5
|
Quote:
|
|
![]() |
![]() |
#1065 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jan 2010
Device: Sony PRS-600
|
I would love a Recipe for http://www.WoW.com/rss.xml, one that pulls the articles from the link within the RSS feed. I usually use the Death Knight Rss Feed http://www.wow.com/category/death-knight/rss.xml a lot, but when I download through Calibre, it pulls the rss feed, but the article stops at "Click here to continue reading"
Any help would be appreciated. Thanks, |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column read ? | pchrist7 | Calibre | 2 | 10-04-2010 02:52 AM |
Archive for custom screensavers | sleeplessdave | Amazon Kindle | 1 | 07-07-2010 12:33 PM |
How to back up preferences and custom recipes? | greenapple | Calibre | 3 | 03-29-2010 05:08 AM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |