|
|
Thread Tools | Search this Thread |
09-14-2021, 09:59 AM | #1 |
Junior Member
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'), ] |
|
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 |