| 1 |
#!/usr/bin/env python |
| 2 |
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai |
| 3 |
from __future__ import with_statement |
| 4 |
|
| 5 |
__license__ = 'GPL v3' |
| 6 |
__copyright__ = '2009, Kovid Goyal <[email protected]> edited by Huan T' |
| 7 |
|
| 8 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 9 |
|
| 10 |
|
| 11 |
class Slashdot(BasicNewsRecipe): |
| 12 |
title = 'Slashdot.org' |
| 13 |
description = '''Tech news. WARNING: This recipe downloads a lot |
| 14 |
of content and may result in your IP being banned from slashdot.org''' |
| 15 |
oldest_article = 7 |
| 16 |
simultaneous_downloads = 1 |
| 17 |
delay = 3 |
| 18 |
max_articles_per_feed = 100 |
| 19 |
language = 'en' |
| 20 |
|
| 21 |
__author__ = 'floweros edited by Huan T' |
| 22 |
no_stylesheets = True |
| 23 |
use_embedded_content = False |
| 24 |
keep_only_tags = [ |
| 25 |
dict(name='div', attrs={'class': 'story'}), |
| 26 |
dict(name='div', attrs={'class': 'body'}), |
| 27 |
dict(name='ul', attrs={'id': 'commentlisting'}), |
| 28 |
] |
| 29 |
|
| 30 |
feeds = [ |
| 31 |
('Slashdot', 'http://rss.slashdot.org/Slashdot/slashdot'), |
| 32 |
('/. IT', 'http://rss.slashdot.org/Slashdot/slashdotIT'), |
| 33 |
('/. Hardware', 'http://rss.slashdot.org/Slashdot/slashdotHardware'), |
| 34 |
('/. Linux', 'http://rss.slashdot.org/Slashdot/slashdotLinux'), |
| 35 |
('/. Your Rights Online', 'http://rss.slashdot.org/Slashdot/slashdotYourRightsOnline'), |
| 36 |
] |