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 09-14-2021, 09:59 AM   #1
Yevhen Kaplia
Junior Member
Yevhen Kaplia began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2021
Device: PocketBook Pro 903
RSS-recipe: How to get file from link in attribute und add in e-book?

I make my second recipe with RSS-feed and don't know to get file from link in attribute and add in e-book.

An example is article from 06. September 2021, 13:17 Uhr "Ein Jahr Ostberlin - Eine Vater-Sohn-Geschichte".
The attribute 'manuscript-download' has links to two files *.pdf and *.txt. How to get *.txt file only and add to e-book in recipe?

Code:
import string, re
from calibre import strftime
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.web.feeds.news import BasicNewsRecipe

class AdvancedUserRecipe1631605042(BasicNewsRecipe):
    title          = 'dlf Das Feature'
    oldest_article = 10
    max_articles_per_feed = 100
    auto_cleanup   = True
    remove_tags = [dict(attrs={'class':['header', 'playbutton', 'largeImage', 'article-share', 'articleside', 'article-share']})]
    
    
    feeds          = [
        ('dlf Das Feature', 'https://www.deutschlandfunk.de/podcast-das-feature.1248.de.podcast.xml'),
    ]
Yevhen Kaplia is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Github - proposed changes to LiveMint recipe to add more RSS feeds duluoz Recipes 2 10-17-2020 10:24 PM
First recipe: how to automatically add cover and filter out videos from RSS kindle87 Recipes 3 04-24-2018 06:28 AM
table of content file link not add in toc.ncx file bhambhu Conversion 0 01-14-2016 01:40 AM
Can't add TOC link to MOBI file!!! karenbryant Calibre 3 09-16-2012 09:04 AM


All times are GMT -4. The time now is 05:40 AM.


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