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, 12:52 PM   #1
schuster
Zealot
schuster doesn't litterschuster doesn't litter
 
Posts: 119
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, 07:05 AM   #2
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
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, 288 views)
Divingduck is offline   Reply With Quote
Advert
Old 11-30-2012, 02: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, 02: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, 03:52 AM   #5
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
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
Advert
Old 11-30-2012, 09: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
Old 02-09-2019, 06:18 AM   #7
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
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.
Attached Files
File Type: zip pro_physik_AGe2019-02-09.zip (137.5 KB, 200 views)
Divingduck is offline   Reply With Quote
Old 02-11-2024, 08:55 AM   #8
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
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:
##
## Written:      November 2012 (new coding)
## Version:      3.4
## Last update:  2024-02-11
##

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

    title          = u'Pro Physik'
    __author__  = 'schuster, Armin Geller' 
    # AGE Upd. 2012-11-28, 2019-02-09,
    #     2019-02-18, 2024-02-11
    # https://www.mobileread.com/forums/showthread.php?t=133184
    
    oldest_article        = 7
    max_articles_per_feed = 100

    no_stylesheets        = True
    remove_javascript     = True
    remove_empty_feeds    = True
    language              = 'de_DE'     
    
    # In case you want to assign a cover picture to this recipe.
    # Copy the file Pro_Physik.png to:
    # c:/Users/YOUR_USERNAME/AppData/Roaming/calibre/resources/images/news_covers/
    # where YOUR_USERNAME needs to be replaced with your username.
    # Then remove # in front of cover_url and replace YOUR_USERNAME with your username as well
    
    # cover_url = file:///c:/Users/YOUR_USERNAME/AppData/Roaming/calibre/resources/images/news_covers/Pro_Physik.png
    
    extra_css      =  '''
                        h1 {font-size: 1.6em; text-align: left}
                        h2, h3 {font-size: 1.3em;text-align: left}
                        h2.subtitle {font-size: 1.2em;text-align: left;font-style: italic}
                        h4, h5, h6 {font-size: 1em;text-align: left}
                        div.caption, div.source {font-size: .75em; font-weight: normal;margin-bottom: .75em}
                      '''

    keep_only_tags    = [
                          dict(name='article', attrs={'id':['story']}),
                          dict(name='div', attrs={'class':['event-item view-mode-default']})
                        ]
                        
    remove_tags = [
                       dict(name='ul', attrs={'class':["wj-share-buttons"]}),  #Block social media
                  ]

    feeds = [
              (u'Nachrichten', u'https://pro-physik.de/rss/news/'),
#              (u'Veranstaltungen', u'https://pro-physik.de/rss/events/'), # AGe 2024-02-11
            ]
Attached Files
File Type: zip pro_physik_AGe2024-02-11.zip (137.4 KB, 102 views)
Divingduck 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 2 05-22-2016 05:00 AM
recipe for FAZ.net - german schuster Recipes 10 05-28-2011 12:13 AM
recipe for Heise Newsticker - german schuster Recipes 0 05-14-2011 12:45 PM
recipe for Welt der Physik - German schuster Recipes 0 05-10-2011 09:18 AM
pro-linux.de recipe Bobus Recipes 0 03-15-2011 01:30 PM


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


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