Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 02-11-2010, 10:09 PM   #1426
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Epicurious: A recipe for recipes

Here is my first recipe attempt - for those who like to cook. The first two feeds are recipes and the second two are food and gourmet related, with some recipes linked in.
Attached Files
File Type: zip Epicurious.zip (1.1 KB, 165 views)
Starson17 is offline  
Old 02-12-2010, 07:32 AM   #1427
cscannella
Member
cscannella began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2010
Device: Kindle
Thanks for the responses.

Also, I simply added "s" to the http for both the instapaper and nytimes recipes (for the login calls). It should be as obviously simple as that to protect my password, no?

Last edited by cscannella; 02-12-2010 at 07:54 AM. Reason: added question
cscannella is offline  
Advert
Old 02-12-2010, 08:33 AM   #1428
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
Quote:
Originally Posted by cscannella View Post
Thanks for the responses.

Also, I simply added "s" to the http for both the instapaper and nytimes recipes (for the login calls). It should be as obviously simple as that to protect my password, no?
That will only work for the sites that actually support secure http since that support is in no way mandatory. Instapaper does support https so it will work for that site.
kiklop74 is offline  
Old 02-12-2010, 12:47 PM   #1429
jomaweb
Connoisseur
jomaweb is on a distinguished road
 
Posts: 81
Karma: 50
Join Date: Jan 2010
Device: Kindle DX
hi all

Anyone has succesfully built a recipe for SQL Server Magazine and Oracle Magazine?

http://www.sqlmag.com/

http://www.oracle.com/oramag/index.html


any help would be appreciated
jomaweb is offline  
Old 02-12-2010, 03:25 PM   #1430
t3d
Enthusiast
t3d began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
Hello,
I'd like to ask for inclusion of my recipe to future calibre releases:
http://github.com/t3d/kalibrator/raw/master/eksiazki.recipe

More to come

Last edited by t3d; 02-12-2010 at 03:33 PM.
t3d is offline  
Advert
Old 02-13-2010, 01:05 PM   #1431
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
NBC Olympics 2010

Here is a quick and dirty Winter Olympics recipe.
It's based on a U.S. site, and I'm not sure if that site blocks non-U.S. access.

Code:
#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2010, Starson17'
'''
www.nbcolympics.com
'''
from calibre.web.feeds.news import BasicNewsRecipe

class Olympics_2010(BasicNewsRecipe):
    title          = u'NBC Olympics 2010'
    __author__  = 'Starson17'
    description = 'Olympics 2010'
    cover_url     = 'http://www.digitaljournal.com/img/1/1/2/1/i/4/7/6/o/WinterOlympics2010-logo.jpg'
    publisher      = 'Olympics 2010'
    tags           = 'Olympics news'
    language = 'en'
    use_embedded_content    = False
    no_stylesheets        = True
    remove_javascript = True
    # recursions = 3
    oldest_article        = 7
    max_articles_per_feed = 10

    keep_only_tags = [dict(name='div', attrs={'class':['Article ','ArticleGallery']}),
                      ]

    remove_tags = [dict(name='div', attrs={'id':['RelatedTagsBox','ShareBox']}),
                   dict(name='div', attrs={'class':['DateUtilities','PhotoGallery BoxRight','Frame','ToolBox']}),
                   ]

    # RSS feeds are at: http://www.nbcolympics.com/rss/index.html
    feeds = [
             ('NBCOlympics.com - News', 'http://www.nbcolympics.com/rss/newscenter/mostpopular.xml'),
             ('NBCOlympics.com - News - Top Stories', 'http://www.nbcolympics.com/rss/newscenter/topstories.xml'),
             ('NBCOlympics.com - News - Latest Headlines', 'http://www.nbcolympics.com/rss/newscenter/latestnews.xml'),
             # ('NBCOlympics.com - Photos', 'http://www.nbcolympics.com/rss/photos/mostpopular.xml'),
             # ('NBCOlympics.com - Photos - Editorial Picks', 'http://www.nbcolympics.com/rss/photos/editorialpicks.xml'),
             # ('NBCOlympics.com - Photos - Latest Slideshows', 'http://www.nbcolympics.com/rss/photos/latestslideshows.xml'),
             ('NBCOlympics.com - Team USA - Latest news', 'http://www.nbcolympics.com/rss/countries/team-usa/index.xml'),
             # ('NBCOlympics.com - Team USA - Latest Slideshows', 'http://www.nbcolympics.com/rss/countries/team-usa/photos/index.xml'),
             # ('NBCOlympics.com - Team USA - Video', 'http://www.nbcolympics.com/rss/countries/team-usa/video/index.xml'),
             # ('NBCOlympics.com - Alpine Skiing - Most Popular News', 'http://www.nbcolympics.com/rss/sport=AS/mostpopular.xml'),
             # ('NBCOlympics.com - Alpine Skiing - Top News', 'http://www.nbcolympics.com/rss/sport=AS/topnews.xml'),
             ('NBCOlympics.com - Alpine Skiing - Latest News', 'http://www.nbcolympics.com/rss/sport=AS/latestnews.xml'),
             # ('NBCOlympics.com - Biathlon - Most Popular News', 'http://www.nbcolympics.com/rss/sport=BT/mostpopular.xml'),
             # ('NBCOlympics.com - Biathlon - Top News', 'http://www.nbcolympics.com/rss/sport=BT/topnews.xml'),
             ('NBCOlympics.com - Biathlon - Latest News', 'http://www.nbcolympics.com/rss/sport=BT/latestnews.xml'),
             # ('NBCOlympics.com - Bobsled - Most Popular News', 'http://www.nbcolympics.com/rss/sport=BS/mostpopular.xml'),
             # ('NBCOlympics.com - Bobsled - Top News', 'http://www.nbcolympics.com/rss/sport=BS/topnews.xml'),
             ('NBCOlympics.com - Bobsled - Latest News', 'http://www.nbcolympics.com/rss/sport=BS/latestnews.xml'),
             # ('NBCOlympics.com - Cross-Country - Most Popular News', 'http://www.nbcolympics.com/rss/sport=CC/mostpopular.xml'),
             # ('NBCOlympics.com - Cross-Country - Top News', 'http://www.nbcolympics.com/rss/sport=CC/topnews.xml'),
             ('NBCOlympics.com - Cross-Country - Latest News', 'http://www.nbcolympics.com/rss/sport=CC/latestnews.xml'),
             # ('NBCOlympics.com - Curling - Most Popular News', 'http://www.nbcolympics.com/rss/sport=CU/mostpopular.xml'),
             # ('NBCOlympics.com - Curling - Top News', 'http://www.nbcolympics.com/rss/sport=CU/topnews.xml'),
             ('NBCOlympics.com - Curling - Latest News', 'http://www.nbcolympics.com/rss/sport=CU/latestnews.xml'),
             # ('NBCOlympics.com - Figure Skating - Most Popular News', 'http://www.nbcolympics.com/rss/sport=FS/mostpopular.xml'),
             # ('NBCOlympics.com - Figure Skating - Top News', 'http://www.nbcolympics.com/rss/sport=FS/topnews.xml'),
             ('NBCOlympics.com - Figure Skating - Latest News', 'http://www.nbcolympics.com/rss/sport=FS/latestnews.xml'),
             # ('NBCOlympics.com - Freestyle Skiing - Most Popular News', 'http://www.nbcolympics.com/rss/sport=FR/mostpopular.xml'),
             # ('NBCOlympics.com - Freestyle Skiing - Top News', 'http://www.nbcolympics.com/rss/sport=FR/topnews.xml'),
             ('NBCOlympics.com - Freestyle Skiing - Latest News', 'http://www.nbcolympics.com/rss/sport=FR/latestnews.xml'),
             # ('NBCOlympics.com - Hockey - Most Popular News', 'http://www.nbcolympics.com/rss/sport=IH/mostpopular.xml'),
             # ('NBCOlympics.com - Hockey - Top News', 'http://www.nbcolympics.com/rss/sport=IH/topnews.xml'),
             ('NBCOlympics.com - Hockey - Latest News', 'http://www.nbcolympics.com/rss/sport=IH/latestnews.xml'),
             # ('NBCOlympics.com - Luge - Most Popular News', 'http://www.nbcolympics.com/rss/sport=LG/mostpopular.xml'),
             # ('NBCOlympics.com - Luge - Top News', 'http://www.nbcolympics.com/rss/sport=LG/topnews.xml'),
             ('NBCOlympics.com - Luge - Latest News', 'http://www.nbcolympics.com/rss/sport=LG/latestnews.xml'),
             # ('NBCOlympics.com - Nordic Combined - Most Popular News', 'http://www.nbcolympics.com/rss/sport=NC/mostpopular.xml'),
             # ('NBCOlympics.com - Nordic Combined - Top News', 'http://www.nbcolympics.com/rss/sport=NC/topnews.xml'),
             ('NBCOlympics.com - Nordic Combined - Latest News', 'http://www.nbcolympics.com/rss/sport=NC/latestnews.xml'),
             # ('NBCOlympics.com - Short Track - Most Popular News', 'http://www.nbcolympics.com/rss/sport=ST/mostpopular.xml'),
             # ('NBCOlympics.com - Short Track - Top News', 'http://www.nbcolympics.com/rss/sport=ST/topnews.xml'),
             ('NBCOlympics.com - Short Track - Latest News', 'http://www.nbcolympics.com/rss/sport=ST/latestnews.xml'),
             # ('NBCOlympics.com - Skeleton - Most Popular News', 'http://www.nbcolympics.com/rss/sport=SN/mostpopular.xml'),
             # ('NBCOlympics.com - Skeleton - Top News', 'http://www.nbcolympics.com/rss/sport=SN/topnews.xml'),
             ('NBCOlympics.com - Skeleton - Latest News', 'http://www.nbcolympics.com/rss/sport=SN/latestnews.xml'),
             # ('NBCOlympics.com - Ski Jumping - Most Popular News', 'http://www.nbcolympics.com/rss/sport=SJ/mostpopular.xml'),
             # ('NBCOlympics.com - Ski Jumping - Top News', 'http://www.nbcolympics.com/rss/sport=SJ/topnews.xml'),
             ('NBCOlympics.com - Ski Jumping - Latest News', 'http://www.nbcolympics.com/rss/sport=SJ/latestnews.xml'),
             # ('NBCOlympics.com - Snowboarding - Most Popular News', 'http://www.nbcolympics.com/rss/sport=SB/mostpopular.xml'),
             # ('NBCOlympics.com - Snowboarding - Top News', 'http://www.nbcolympics.com/rss/sport=SB/topnews.xml'),
             ('NBCOlympics.com - Snowboarding - Latest News', 'http://www.nbcolympics.com/rss/sport=SB/latestnews.xml'),
             # ('NBCOlympics.com - Speed Skating - Most Popular News', 'http://www.nbcolympics.com/rss/sport=AS/mostpopular.xml'),
             # ('NBCOlympics.com - Speed Skating - Top News', 'http://www.nbcolympics.com/rss/sport=AS/topnews.xml'),
             ('NBCOlympics.com - Speed Skating - Latest News', 'http://www.nbcolympics.com/rss/sport=AS/latestnews.xml'),
             ]

    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''
Starson17 is offline  
Old 02-13-2010, 01:24 PM   #1432
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Flash slideshow code?

Has anyone written code, or is it in any recipe, to grab .jpg images from a flash slideshow? I took a look at html code from the Olympic site above and found an embedded link to :
Code:
http://www.nbcolympics.com/code/flash/photogallery.swf?path=http://www.nbcolympics.com/xmlfeed/photogallery/newsid=412282.xml
The source on that page has this in it:
Spoiler:
412282WARNING: Graphic content. Georgian luger Nodar Kumaritashvili was killed in a crash during a training run Friday at the Whistler Sliding Centre. He was 21 years old.http://www.nbcolympics.com/photos/ga...etruefalseRate this photoHide captionShow captionHide thumbnailsShow thumbnailsofphotosPHOTONextPreviousPlay SlideshowStopLG Nodar KumaritashviliGeorgia412296Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/96/412296_m05.jpg412128Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m15.jpghttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m03.jpghttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m02.jpghttp://www.nbcolympics.com/mm/photo/videos/general/41/21/28/412128_m05.jpg412288Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/88/412288_m05.jpg412289Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/89/412289_m05.jpg412290Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/90/412290_m05.jpg412291Getty ImagesNodar Kumaritashvihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/91/412291_m05.jpg412292Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/92/412292_m05.jpg412357ReutersWorkers load luger into ambulancehttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/57/412357_m05.jpg412358ReutersLittle comforthttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/58/412358_m05.jpg412360ReutersStanding guardhttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/60/412360_m05.jpg412362Getty ImagesJacques Roggehttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/62/412362_m05.jpg412363Getty ImagesJacques Roggehttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/63/412363_m05.jpg412364Getty ImagesJohn Furlonghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/64/412364_m05.jpg412359ReutersGeorgian flaghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/23/59/412359_m05.jpg412295Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/95/412295_m05.jpg412294Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/22/94/412294_m05.jpg412859Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/59/412859_m05.jpg412860Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/60/412860_m05.jpg412861Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/61/412861_m05.jpg412862Getty ImagesNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/62/412862_m05.jpg412891ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/91/412891_m05.jpg412896ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/28/96/412896_m05.jpg412917ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/17/412917_m05.jpg412934ReutersNodar Kumaritashvilihttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m15.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m03.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m02.jpghttp://www.nbcolympics.com/mm/photo/sports/general/41/29/34/412934_m05.jpg

and by changing the m03 to m02 of the .jpg links I get the large photos. Has anyone written a recipe to do this or anything similar?

Thanks.

(BTW, these links go to photos relating to the training accident that killed a luger. They just happened to be the first on the list of flash photo slideshow links.)

Edit:

If this hasn't been done, I'd appreciate thoughts on a reasonable approach to doing this. I was thinking of using an approach like this:
1) the feed has to have use_embedded_content = False to make sure that it goes to the flash slideshow page;
2) then process that page with preprocess_html and BeautifulSoup to remove everything but the link to the page that has the links to the images;
3) then follow to that second page and process it with postprocess_html and BeautifulSoup to display all the images.

This puts an extra page between the images and the feed link, but that could probably be removed with more work.

Comments?

Last edited by Starson17; 02-13-2010 at 02:33 PM.
Starson17 is offline  
Old 02-14-2010, 08:10 AM   #1433
cscannella
Member
cscannella began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Feb 2010
Device: Kindle
Thanks. Definitely works for Instapaper, and it works for the NY Times as well.
cscannella is offline  
Old 02-14-2010, 10:00 AM   #1434
ReCyler
Junior Member
ReCyler began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2010
Device: Kindle DX
You wonderful people would make this little econ geeks dream come true if I could get recipes for:

http://www.econbrowser.com/
http://www.calculatedriskblog.com/
http://www.nakedcapitalism.com/
ReCyler is offline  
Old 02-14-2010, 03:53 PM   #1435
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
Naked capitalisam is already supported in calibre
kiklop74 is offline  
Old 02-15-2010, 04:18 AM   #1436
TBR
Junior Member
TBR began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2010
Device: Sony PRS-505, Asus eeePC 1000H
Thanks very much, sorry for being late in replying, had some health difficulties.


Quote:
Originally Posted by kiklop74 View Post
This is what you should put in your recipe for complete cleanup:

Code:
    remove_attributes  = ['width','height']
    remove_tags_before = dict(name='h1')
    remove_tags_after  = dict(name='div',attrs={'class':'ynw-article-body mod'})
    remove_tags        = [
                            dict(attrs={'id':['ynw-image-video-inset','ynw-more-news']})
                           ,dict(attrs={'class':['ynw-utility']})
                         ]
TBR is offline  
Old 02-15-2010, 11:50 AM   #1437
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Here is another Winter Olympics recipe. This one has nothing in it but photos and the headers/titles for the photos, so it can be quite large. Even with only 3 of the feeds turned on, this ebook is 25 MB in size.

Spoiler:
#!/usr/bin/env python

__license__ = 'GPL v3'
__copyright__ = '2010, Starson17'
'''
www.nbcolympics.com
'''
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag, NavigableString
import re

class OlympicsP_2010(BasicNewsRecipe):
title = u'Olympics Photos 2010'
__author__ = 'Starson17'
description = 'Olympics Photos 2010'
cover_url = 'http://www.digitaljournal.com/img/1/1/2/1/i/4/7/6/o/WinterOlympics2010-logo.jpg'
publisher = 'Olympics 2010'
tags = 'Olympics news'
language = 'en'
use_embedded_content = False
no_stylesheets = True
remove_javascript = False
# recursions = 3
# oldest_article = 2
max_articles_per_feed = 20

keep_only_tags = [
dict(name='div', attrs={'class':['galleryHeaderTop']}),
dict(name='div', attrs={'id':['BodyContentMM']}),
]

remove_tags = [
dict(name='div', attrs={'class':['floatBoxLeft Box100','DateUtilities','ImageDiv','NewsPhotos NewsPhotos_ieFix ','NewsPhotoHeaderSection']}),
]

# RSS feeds are at: http://www.nbcolympics.com/rss/index.html
feeds = [
('NBCOlympics.com - Most Popular - Photos', 'http://www.nbcolympics.com/rss/photos/mostpopular.xml'),
('NBCOlympics.com - Editorial Picks - Photos', 'http://www.nbcolympics.com/rss/photos/editorialpicks.xml'),
('NBCOlympics.com - Latest - Photos', 'http://www.nbcolympics.com/rss/photos/latestslideshows.xml'),
#('NBCOlympics.com - Destination Vancouver - Photos', 'http://www.nbcolympics.com/rss/specialty/destination-vancouve/photos/index.xml'),
#('NBCOlympics.com - Fast and Furious - Photos', 'http://www.nbcolympics.com/rss/specialty/fast-fearless/photos/index.xml'),
#('NBCOlympics.com - Golden Moments - Photos', 'http://www.nbcolympics.com/rss/specialty/golden-moments/photos/index.xml'),
]

def preprocess_html(self, soup):
script_item = soup.find('div',attrs={'class':'contentRow '})
header = soup.find('div',attrs={'class':'galleryHeaderTop'} )
if script_item:
p_flashlink = re.compile(r'http:.*\.xml')
m_flashlink = p_flashlink.findall(str(script_item.contents))
if m_flashlink:
print('m_flashlink[0] is: ', m_flashlink[0])
rawc = self.index_to_soup(m_flashlink[0],True)
soup2 = BeautifulSoup(rawc, fromEncoding=self.encoding)
# print ('soup2 is: ', soup2)
gallery_title = soup2.gallery.title
gallery_comment = soup2.gallery.comment
if gallery_comment :
gallery_comment_tag = Tag(soup, 'h2')
# print ('gallery_comment is: ', str(gallery_comment.string))
gallery_comment = NavigableString(gallery_comment.string)
gallery_comment_tag.insert(0, gallery_comment)
header.parent.insert(1, gallery_comment_tag)
photopaths = soup2.findAll('photopath')
if photopaths:
for photopath in photopaths:
imgsrc = str(photopath.string)
# print('imgsrc is: ', imgsrc)
divtag = Tag(soup, 'div')
photo_title_tag = Tag(soup, 'h3')
photo_comment_tag = Tag(soup, 'p')
imgtag = Tag(soup, 'img', [('src', imgsrc)])
photo_title = NavigableString(photopath.parent.title.string)
photo_comment = NavigableString(photopath.parent.comment.string)
photo_alt = NavigableString(photopath.parent.alt.string)
imgtag['alt'] = photo_alt
photo_title_tag.insert(0, photo_title)
photo_comment_tag.insert(0, photo_comment)
divtag.insert(0, photo_comment_tag)
divtag.insert(0, photo_title_tag)
divtag.insert(0, imgtag)
insert_posn = len(header.parent)
header.parent.insert(insert_posn, divtag)
script_item.extract()
else:
script_item.extract()
return soup

For convenience, here is the text-based recipe for the Olympics.
Spoiler:
#!/usr/bin/env python

__license__ = 'GPL v3'
__copyright__ = '2010, Starson17'
'''
www.nbcolympics.com
'''
from calibre.web.feeds.news import BasicNewsRecipe

class Olympics_2010(BasicNewsRecipe):
title = u'NBC Olympics 2010'
__author__ = 'Starson17'
description = 'Olympics 2010'
cover_url = 'http://www.digitaljournal.com/img/1/1/2/1/i/4/7/6/o/WinterOlympics2010-logo.jpg'
publisher = 'Olympics 2010'
tags = 'Olympics news'
language = 'en'
use_embedded_content = False
no_stylesheets = True
remove_javascript = True
# recursions = 3
oldest_article = 7
max_articles_per_feed = 10

keep_only_tags = [dict(name='div', attrs={'class':['Article ','ArticleGallery']}),
]

remove_tags = [dict(name='div', attrs={'id':['RelatedTagsBox','ShareBox']}),
dict(name='div', attrs={'class':['DateUtilities','PhotoGallery BoxRight','Frame','ToolBox']}),
]

# RSS feeds are at: http://www.nbcolympics.com/rss/index.html
feeds = [
('NBCOlympics.com - News', 'http://www.nbcolympics.com/rss/newscenter/mostpopular.xml'),
('NBCOlympics.com - News - Top Stories', 'http://www.nbcolympics.com/rss/newscenter/topstories.xml'),
('NBCOlympics.com - News - Latest Headlines', 'http://www.nbcolympics.com/rss/newscenter/latestnews.xml'),
# ('NBCOlympics.com - Photos', 'http://www.nbcolympics.com/rss/photos/mostpopular.xml'),
# ('NBCOlympics.com - Photos - Editorial Picks', 'http://www.nbcolympics.com/rss/photos/editorialpicks.xml'),
# ('NBCOlympics.com - Photos - Latest Slideshows', 'http://www.nbcolympics.com/rss/photos/latestslideshows.xml'),
('NBCOlympics.com - Team USA - Latest news', 'http://www.nbcolympics.com/rss/countries/team-usa/index.xml'),
# ('NBCOlympics.com - Team USA - Latest Slideshows', 'http://www.nbcolympics.com/rss/countries/team-usa/photos/index.xml'),
# ('NBCOlympics.com - Team USA - Video', 'http://www.nbcolympics.com/rss/countries/team-usa/video/index.xml'),
# ('NBCOlympics.com - Alpine Skiing - Most Popular News', 'http://www.nbcolympics.com/rss/sport=AS/mostpopular.xml'),
# ('NBCOlympics.com - Alpine Skiing - Top News', 'http://www.nbcolympics.com/rss/sport=AS/topnews.xml'),
('NBCOlympics.com - Alpine Skiing - Latest News', 'http://www.nbcolympics.com/rss/sport=AS/latestnews.xml'),
# ('NBCOlympics.com - Biathlon - Most Popular News', 'http://www.nbcolympics.com/rss/sport=BT/mostpopular.xml'),
# ('NBCOlympics.com - Biathlon - Top News', 'http://www.nbcolympics.com/rss/sport=BT/topnews.xml'),
('NBCOlympics.com - Biathlon - Latest News', 'http://www.nbcolympics.com/rss/sport=BT/latestnews.xml'),
# ('NBCOlympics.com - Bobsled - Most Popular News', 'http://www.nbcolympics.com/rss/sport=BS/mostpopular.xml'),
# ('NBCOlympics.com - Bobsled - Top News', 'http://www.nbcolympics.com/rss/sport=BS/topnews.xml'),
('NBCOlympics.com - Bobsled - Latest News', 'http://www.nbcolympics.com/rss/sport=BS/latestnews.xml'),
# ('NBCOlympics.com - Cross-Country - Most Popular News', 'http://www.nbcolympics.com/rss/sport=CC/mostpopular.xml'),
# ('NBCOlympics.com - Cross-Country - Top News', 'http://www.nbcolympics.com/rss/sport=CC/topnews.xml'),
('NBCOlympics.com - Cross-Country - Latest News', 'http://www.nbcolympics.com/rss/sport=CC/latestnews.xml'),
# ('NBCOlympics.com - Curling - Most Popular News', 'http://www.nbcolympics.com/rss/sport=CU/mostpopular.xml'),
# ('NBCOlympics.com - Curling - Top News', 'http://www.nbcolympics.com/rss/sport=CU/topnews.xml'),
('NBCOlympics.com - Curling - Latest News', 'http://www.nbcolympics.com/rss/sport=CU/latestnews.xml'),
# ('NBCOlympics.com - Figure Skating - Most Popular News', 'http://www.nbcolympics.com/rss/sport=FS/mostpopular.xml'),
# ('NBCOlympics.com - Figure Skating - Top News', 'http://www.nbcolympics.com/rss/sport=FS/topnews.xml'),
('NBCOlympics.com - Figure Skating - Latest News', 'http://www.nbcolympics.com/rss/sport=FS/latestnews.xml'),
# ('NBCOlympics.com - Freestyle Skiing - Most Popular News', 'http://www.nbcolympics.com/rss/sport=FR/mostpopular.xml'),
# ('NBCOlympics.com - Freestyle Skiing - Top News', 'http://www.nbcolympics.com/rss/sport=FR/topnews.xml'),
('NBCOlympics.com - Freestyle Skiing - Latest News', 'http://www.nbcolympics.com/rss/sport=FR/latestnews.xml'),
# ('NBCOlympics.com - Hockey - Most Popular News', 'http://www.nbcolympics.com/rss/sport=IH/mostpopular.xml'),
# ('NBCOlympics.com - Hockey - Top News', 'http://www.nbcolympics.com/rss/sport=IH/topnews.xml'),
('NBCOlympics.com - Hockey - Latest News', 'http://www.nbcolympics.com/rss/sport=IH/latestnews.xml'),
# ('NBCOlympics.com - Luge - Most Popular News', 'http://www.nbcolympics.com/rss/sport=LG/mostpopular.xml'),
# ('NBCOlympics.com - Luge - Top News', 'http://www.nbcolympics.com/rss/sport=LG/topnews.xml'),
('NBCOlympics.com - Luge - Latest News', 'http://www.nbcolympics.com/rss/sport=LG/latestnews.xml'),
# ('NBCOlympics.com - Nordic Combined - Most Popular News', 'http://www.nbcolympics.com/rss/sport=NC/mostpopular.xml'),
# ('NBCOlympics.com - Nordic Combined - Top News', 'http://www.nbcolympics.com/rss/sport=NC/topnews.xml'),
('NBCOlympics.com - Nordic Combined - Latest News', 'http://www.nbcolympics.com/rss/sport=NC/latestnews.xml'),
# ('NBCOlympics.com - Short Track - Most Popular News', 'http://www.nbcolympics.com/rss/sport=ST/mostpopular.xml'),
# ('NBCOlympics.com - Short Track - Top News', 'http://www.nbcolympics.com/rss/sport=ST/topnews.xml'),
('NBCOlympics.com - Short Track - Latest News', 'http://www.nbcolympics.com/rss/sport=ST/latestnews.xml'),
# ('NBCOlympics.com - Skeleton - Most Popular News', 'http://www.nbcolympics.com/rss/sport=SN/mostpopular.xml'),
# ('NBCOlympics.com - Skeleton - Top News', 'http://www.nbcolympics.com/rss/sport=SN/topnews.xml'),
('NBCOlympics.com - Skeleton - Latest News', 'http://www.nbcolympics.com/rss/sport=SN/latestnews.xml'),
# ('NBCOlympics.com - Ski Jumping - Most Popular News', 'http://www.nbcolympics.com/rss/sport=SJ/mostpopular.xml'),
# ('NBCOlympics.com - Ski Jumping - Top News', 'http://www.nbcolympics.com/rss/sport=SJ/topnews.xml'),
('NBCOlympics.com - Ski Jumping - Latest News', 'http://www.nbcolympics.com/rss/sport=SJ/latestnews.xml'),
# ('NBCOlympics.com - Snowboarding - Most Popular News', 'http://www.nbcolympics.com/rss/sport=SB/mostpopular.xml'),
# ('NBCOlympics.com - Snowboarding - Top News', 'http://www.nbcolympics.com/rss/sport=SB/topnews.xml'),
('NBCOlympics.com - Snowboarding - Latest News', 'http://www.nbcolympics.com/rss/sport=SB/latestnews.xml'),
# ('NBCOlympics.com - Speed Skating - Most Popular News', 'http://www.nbcolympics.com/rss/sport=AS/mostpopular.xml'),
# ('NBCOlympics.com - Speed Skating - Top News', 'http://www.nbcolympics.com/rss/sport=AS/topnews.xml'),
('NBCOlympics.com - Speed Skating - Latest News', 'http://www.nbcolympics.com/rss/sport=AS/latestnews.xml'),
]

extra_css = '''
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
'''
Starson17 is offline  
Old 02-15-2010, 03:50 PM   #1438
Jonas777
Groupie
Jonas777 has a complete set of Star Wars action figures.Jonas777 has a complete set of Star Wars action figures.Jonas777 has a complete set of Star Wars action figures.Jonas777 has a complete set of Star Wars action figures.
 
Jonas777's Avatar
 
Posts: 153
Karma: 364
Join Date: Oct 2009
Location: Sweden
Device: Amazon Kindle 2 Intl
Quote:
Originally Posted by Jonas777 View Post
So I created a basic one for a local paper called Östgöta Correspondenten a.k.a. Corren, see attached file. It's my first try so I am sure it can be improved.
That recipe does not seem to work anymore. You may wish to disable it until I or someone else fixes it.
Jonas777 is offline  
Old 02-15-2010, 06:11 PM   #1439
Dereks
Connoisseur
Dereks began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Feb 2010
Device: Kindle Paperwhite 1
Smile google starred items

Hi guys,
I was searching quite a lot through the topic, but didn't manage to find the exact solution.
I need to have a google reader recipe, which will pick up only starred items from the feed (no need for tagging and or storing it all in sub folders, just plain simple starred items). If I understand correctly that's how default google recipe used to work.
Can it be done?
thank you.
Dereks is offline  
Old 02-15-2010, 11:21 PM   #1440
pdxsam
Junior Member
pdxsam began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2010
Device: none
Greetings, I've been searching and around and saw a couple of requests for a NY Daily News recipe. Does anyone know if such a beast exists? If so, could you point me to it?

Thanks,
Sam
pdxsam is offline  
Closed Thread


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 11:13 AM.


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