mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
New recipe for Chicago Breaking News by Darko Miletic
This commit is contained in:
parent
c99e7430df
commit
49c1818125
BIN
src/calibre/gui2/images/news/chicago_breaking_news.png
Normal file
BIN
src/calibre/gui2/images/news/chicago_breaking_news.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 704 B |
@ -28,7 +28,7 @@ recipe_modules = ['recipe_' + r for r in (
|
|||||||
'la_tercera', 'el_mercurio_chile', 'la_cuarta', 'lanacion_chile', 'la_segunda',
|
'la_tercera', 'el_mercurio_chile', 'la_cuarta', 'lanacion_chile', 'la_segunda',
|
||||||
'jb_online', 'estadao', 'o_globo', 'vijesti', 'elmundo', 'the_oz',
|
'jb_online', 'estadao', 'o_globo', 'vijesti', 'elmundo', 'the_oz',
|
||||||
'honoluluadvertiser', 'starbulletin', 'exiled', 'indy_star', 'dna',
|
'honoluluadvertiser', 'starbulletin', 'exiled', 'indy_star', 'dna',
|
||||||
'pobjeda',
|
'pobjeda', 'chicago_breaking_news',
|
||||||
)]
|
)]
|
||||||
|
|
||||||
import re, imp, inspect, time, os
|
import re, imp, inspect, time, os
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
chicagobreakingnews.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class ChicagoBreakingNews(BasicNewsRecipe):
|
||||||
|
title = 'Chicago Breaking News'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Breaking News from Chicago'
|
||||||
|
oldest_article = 1
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = True
|
||||||
|
publisher = 'Chicago Breaking News'
|
||||||
|
category = 'news, politics, USA, Chicago'
|
||||||
|
encoding = 'utf8'
|
||||||
|
language = _('English')
|
||||||
|
|
||||||
|
html2lrf_options = [
|
||||||
|
'--comment', description
|
||||||
|
, '--category', category
|
||||||
|
, '--publisher', publisher
|
||||||
|
]
|
||||||
|
|
||||||
|
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
|
||||||
|
|
||||||
|
feeds = [(u'Breaking news', u'http://feeds2.feedburner.com/ChicagoBreakingNews/')]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
links = soup.findAll('a')
|
||||||
|
for item in soup.findAll('a'):
|
||||||
|
if item['href'].find('http://feedads.googleadservices.com') > -1:
|
||||||
|
item.extract()
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
for item in soup.findAll(color=True):
|
||||||
|
del item['color']
|
||||||
|
for item in soup.findAll(size=True):
|
||||||
|
del item['size']
|
||||||
|
return soup
|
Loading…
x
Reference in New Issue
Block a user