Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2011, 01:52 PM   #1
schuster
Zealot
schuster doesn't litterschuster doesn't litter
 
Posts: 116
Karma: 100
Join Date: Jan 2011
Location: Germany / NRW /Köln
Device: prs-650 / prs-350 /kindle 3
recipe for Pro Physik - german

Code:
import string, re
from calibre import strftime
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
class AdvancedUserRecipe1303841067(BasicNewsRecipe):

    title          = u'Pro Physik'
    __author__  = 'schuster'
    oldest_article = 4
    max_articles_per_feed = 100
    no_stylesheets         = True
    use_embedded_content   = False
    language               = 'de'
    remove_javascript      = True
    cover_url = 'http://www.pro-physik.de/Phy/images/site/prophysik_logo1.jpg'

 
    def print_version(self, url):
        return url.replace('leadArticle.do', 'print.do')


    feeds          = [(u'Hightech', u'http://www.pro-physik.de/Phy/hightechfeed.xml'),
                          (u'Forschung', u'http://www.pro-physik.de/Phy/forschungfeed.xml'),
                          (u'Magazin', u'http://www.pro-physik.de/Phy/magazinfeed.xml')]
schuster is offline   Reply With Quote
Old 11-28-2012, 08:05 AM   #2
Divingduck
Fanatic
Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.
 
Posts: 562
Karma: 124000
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Please find below an update for this recipe. Feel free to use it and/or modify it to your needs.

Spoiler:
Code:
from calibre.web.feeds.recipes import BasicNewsRecipe
class AdvancedUserRecipe1303841067(BasicNewsRecipe):

    title          = u'Pro Physik'
    __author__  = 'schuster, Armin Geller' # AGE Upd. 2012-11-28
    oldest_article        = 4
    max_articles_per_feed = 100

    no_stylesheets        = True
    remove_javascript     = True
    remove_empty_feeds    = True
    language              = 'de_DE'     
    
    cover_url = 'http://www.pro-physik.de/prophy/images/bg_logo_prophy.gif'


    keep_only_tags    = [
                          dict(name='div', attrs={'class':['leftColRight']})
                        ]
                        
    remove_tags = [
                    dict(name='div', attrs={'class':["withMargin socialWrapper addthis_toolbox addthis_default_style"]}),
                  # AGe: If you don't like to see further informations for the article
                  #      and additional links please remove # in belows next line
#                    dict(name='div', attrs={'class':["insideBox"]}),
                  ]

    feeds = [
              (u'Nachrichten', u'http://www.pro-physik.de/graphicalrss/prophy/newsFeed.xml'),
              (u'Forschung', u'http://www.pro-physik.de/graphicalrss/prophy/newsforschungFeed.xml'),
              (u'Techologie', u'http://www.pro-physik.de/graphicalrss/prophy/newstechnologieFeed.xml'),
              (u'Industrie', u'http://www.pro-physik.de/graphicalrss/prophy/newsindustrieFeed.xml'),
              (u'Hochschule', u'http://www.pro-physik.de/graphicalrss/prophy/newshochschuleFeed.xml'),
              (u'Panorama', u'http://www.pro-physik.de/graphicalrss/prophy/newspanoramaFeed.xml'),
              (u'DPG', u'http://www.pro-physik.de/graphicalrss/prophy/newsdpgFeed.xml'),
              (u'Physik Jornal', u'http://www.pro-physik.de/graphicalrss/prophy/pjnewsFeed.xml'),
              (u'Veranstaltungen', u'http://www.pro-physik.de/rss/prophy/eventsFeed.xml'),

              # AGe if you like to see job offers please remove # on next lines below
              
#              (u'Stellenmarkt', u'http://www.pro-physik.de/rss/prophy/jobsFeed.xml'),
#              (u'Industrie Stellenanzeigen', u'http://www.pro-physik.de/rss/prophy/jobsindustrieFeed.xml'),
#              (u'PhD Stellenanzeigen', u'http://www.pro-physik.de/rss/prophy/jobsphdFeed.xml'),
#              (u'PostDoc Stellenanzeigen', u'http://www.pro-physik.de/rss/prophy/jobspostdocFeed.xml'),
#              (u'Öffentlicher Dienst Stellenanzeigen', u'http://www.pro-physik.de/rss/prophy/jobsdienstFeed.xml'),
#              (u'Hochschule Stellenanzeigen', u'http://www.pro-physik.de/rss/prophy/jobshochschuleFeed.xml'),
            ]
Attached Files
File Type: zip pro_physik_AGe2012-11-28.zip (956 Bytes, 46 views)
Divingduck is offline   Reply With Quote
 
Advertisement
Old 11-30-2012, 03:52 AM   #3
dkosse
Member
dkosse began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2012
Device: Sony PRS-T1, PocketBook 902
Hei divingduck,

thank you very much but as wit Aachener nachrichten, yesterdey no probs with Sony connected, today with Pocketbook pro an error message.

If you have a hint?

Best regards

dkosse
dkosse is offline   Reply With Quote
Old 11-30-2012, 03:59 AM   #4
dkosse
Member
dkosse began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2012
Device: Sony PRS-T1, PocketBook 902
Hi,

I have just tried with Sony T1 reader connected, the following error message:

'subset_embedded_fonts': False,
'tags': None,
'test': False,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: Recipe Input running
Using custom recipe
Python function terminated unexpectedly
(Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 186, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 1009, in run
File "site-packages\calibre\customize\conversion.py", line 239, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\recipe_ input.py", line 109, in convert
File "site-packages\calibre\web\feeds\news.py", line 891, in download
File "site-packages\calibre\web\feeds\news.py", line 1063, in build_index
File "site-packages\calibre\web\feeds\news.py", line 1480, in parse_feeds
File "site-packages\calibre\web\feeds\news.py", line 381, in get_feeds
NotImplementedError


Best regards

dkosse

'subset_embedded_fonts': False,
'tags': None,
'test': False,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: Recipe Input running
Using custom recipe
Python function terminated unexpectedly
(Error Code: 1)
Traceback (most recent call last):
File "site.py", line 132, in main
File "site.py", line 109, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 186, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 1009, in run
File "site-packages\calibre\customize\conversion.py", line 239, in __call__
File "site-packages\calibre\ebooks\conversion\plugins\recipe_ input.py", line 109, in convert
File "site-packages\calibre\web\feeds\news.py", line 891, in download
File "site-packages\calibre\web\feeds\news.py", line 1063, in build_index
File "site-packages\calibre\web\feeds\news.py", line 1480, in parse_feeds
File "site-packages\calibre\web\feeds\news.py", line 381, in get_feeds
NotImplementedError
dkosse is offline   Reply With Quote
Old 11-30-2012, 04:52 AM   #5
Divingduck
Fanatic
Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.Divingduck can talk all four legs off a donkey... then persuade it to go for a walk.
 
Posts: 562
Karma: 124000
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Just check the recipe with Calibre 0.9.8. Can't see any problems with the recipe.
Best regards, DD
Divingduck is offline   Reply With Quote
Old 11-30-2012, 10:39 AM   #6
dkosse
Member
dkosse began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Nov 2012
Device: Sony PRS-T1, PocketBook 902
With 0.9.8 no probs.

Many thanks!

dkosse
dkosse is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
recipe for Bild.de - German schuster Recipes 1 06-03-2011 07:56 AM
recipe for FAZ.net - german schuster Recipes 10 05-28-2011 01:13 AM
recipe for Heise Newsticker - german schuster Recipes 0 05-14-2011 01:45 PM
recipe for Welt der Physik - German schuster Recipes 0 05-10-2011 10:18 AM
pro-linux.de recipe Bobus Recipes 0 03-15-2011 02:30 PM


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


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