diff --git a/src/libprs500/ebooks/lrf/web/__init__.py b/src/libprs500/ebooks/lrf/web/__init__.py index a110ca5d4d..2452d7b4d1 100644 --- a/src/libprs500/ebooks/lrf/web/__init__.py +++ b/src/libprs500/ebooks/lrf/web/__init__.py @@ -23,9 +23,11 @@ from libprs500.ebooks.lrf.web.profiles.zeitde import ZeitNachrichten from libprs500.ebooks.lrf.web.profiles.faznet import FazNet from libprs500.ebooks.lrf.web.profiles.wsj import WallStreetJournal from libprs500.ebooks.lrf.web.profiles.barrons import Barrons -from libprs500.ebooks.lrf.web.profiles.portfolio import Portfolio +from libprs500.ebooks.lrf.web.profiles.portfolio import Portfolio +from libprs500.ebooks.lrf.web.profiles.dilbert import Dilbert +from libprs500.ebooks.lrf.web.profiles.cnn import CNN -builtin_profiles = [Barrons, BBC, Economist, FazNet, Newsweek, NewYorkReviewOfBooks, NYTimes, \ +builtin_profiles = [Barrons, BBC, CNN, Dilbert, Economist, FazNet, Newsweek, NewYorkReviewOfBooks, NYTimes, \ Portfolio, SpiegelOnline, WallStreetJournal, ZeitNachrichten, \ ] diff --git a/src/libprs500/ebooks/lrf/web/profiles/cnn.py b/src/libprs500/ebooks/lrf/web/profiles/cnn.py new file mode 100644 index 0000000000..d3e151c318 --- /dev/null +++ b/src/libprs500/ebooks/lrf/web/profiles/cnn.py @@ -0,0 +1,63 @@ +## Copyright (C) 2007 Kovid Goyal kovid@kovidgoyal.net +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License along +## with this program; if not, write to the Free Software Foundation, Inc., +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +''' +Profile to download CNN +''' +import re +from libprs500.ebooks.lrf.web.profiles import DefaultProfile + +class CNN(DefaultProfile): + + title = 'CNN' + max_recursions = 2 + timefmt = ' [%d %b %Y]' + html_description = True + no_stylesheets = True + oldest_article = 15 + + preprocess_regexps = [(re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in [ + (r'
.*?