| 1 |
__license__ = 'GPL v3' |
| 2 |
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' |
| 3 |
|
| 4 |
''' |
| 5 |
Fetch Anandtech. |
| 6 |
''' |
| 7 |
|
| 8 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 9 |
|
| 10 |
|
| 11 |
class anan(BasicNewsRecipe): |
| 12 |
title = 'Anandtech' |
| 13 |
description = 'comprehensive Hardware Tests' |
| 14 |
__author__ = 'Oliver Niesner, Armin Geller' # 2014-02-27 AGE: update |
| 15 |
use_embedded_content = False |
| 16 |
language = 'en' |
| 17 |
timefmt = ' [%d %b %Y]' |
| 18 |
oldest_article = 7 |
| 19 |
max_articles_per_feed = 40 |
| 20 |
no_stylesheets = True |
| 21 |
remove_javascript = True |
| 22 |
encoding = 'utf-8' |
| 23 |
|
| 24 |
cover_url = 'http://www.anandtech.com/content/images/globals/header_logo.png' |
| 25 |
masthead_url = 'http://www.anandtech.com/content/images/globals/printheader.png' |
| 26 |
|
| 27 |
keep_only_tags = [ |
| 28 |
dict(name='section', attrs={'class': ['main_cont']}), |
| 29 |
] |
| 30 |
remove_tags = [ |
| 31 |
dict( |
| 32 |
name='div', |
| 33 |
attrs={ |
| 34 |
'class': [ |
| 35 |
'print', |
| 36 |
'breadcrumb_area noprint', |
| 37 |
'fl-rt noprint', |
| 38 |
'blog_top_right', |
| 39 |
] |
| 40 |
}, |
| 41 |
) |
| 42 |
] |
| 43 |
|
| 44 |
feeds = [('Anandtech', 'http://www.anandtech.com/rss/')] |
| 45 |
|
| 46 |
def print_version(self, url): |
| 47 |
# return url.replace("0Cshow0C", "0Cprint0C") # 2013-09-07 AGE: update |
| 48 |
return url.replace('/show/', '/print/') # 2014-02-27 AGE: update |