|
|
#1 |
|
Enthusiast
![]() Posts: 27
Karma: 10
Join Date: Nov 2015
Device: PocketBook Touch Lux 3
|
Fetching images from AFP (France24.com)
Hi,
does anybody has an idea how to fetch images from http://www.france24.com/en/wires/rss into an ebook through a custom recipe? My recipe fetches text only: Code:
import re, string, time
from calibre import entity_to_unicode, strftime
from datetime import timedelta, date
from datetime import timedelta, datetime, date
class BasicUserRecipe1483714006(AutomaticNewsRecipe):
title = u'France24'
oldest_article = 14
max_articles_per_feed = 100
compress_news_images = True
compress_news_images_max_size =30
auto_cleanup = True
timefmt = ' [%Y-%m-%d@%H:%M]'
conversion_options = {'title' : title + ' - ' + strftime('%Y-%m-%d@%H:%M')}
def preprocess_html(self, soup):
for alink in soup.findAll('a'):
if alink.string is not None:
tstr = alink.string
alink.replaceWith(tstr)
return soup
feeds = [(u'France24', u'http://www.france24.com/en/wires/rss')]
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fetching News UI | fafaforza | Calibre | 3 | 08-24-2012 01:59 AM |
| Fetching News | Zerenthal | Library Management | 4 | 08-15-2011 04:17 PM |
| Fetching News has gone bad... | rogue_ronin | Calibre | 6 | 09-03-2010 09:41 AM |
| No Fetching | Lector77 | Calibre | 13 | 06-21-2010 08:19 PM |
| Fetching The Australian | Javed | Calibre | 7 | 11-30-2009 05:15 AM |