| 1 |
#!/usr/bin/env python |
| 2 |
|
| 3 |
__license__ = 'GPL v3' |
| 4 |
__copyright__ = '2009, Rick Kellogg' |
| 5 |
''' |
| 6 |
java.dzone.com |
| 7 |
''' |
| 8 |
|
| 9 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 10 |
|
| 11 |
|
| 12 |
class Engadget(BasicNewsRecipe): |
| 13 |
title = 'Javalobby' |
| 14 |
__author__ = 'Rick Kellogg' |
| 15 |
description = 'news' |
| 16 |
language = 'en' |
| 17 |
oldest_article = 7 |
| 18 |
max_articles_per_feed = 100 |
| 19 |
no_stylesheets = True |
| 20 |
use_embedded_content = False |
| 21 |
|
| 22 |
remove_tags = [ |
| 23 |
dict(name='div', attrs={'class': ['fivestar-static-form-item', 'relatedContent', 'pagination clearfix', 'addResources']}), |
| 24 |
dict(name='div', attrs={'id': ['comments']}), |
| 25 |
] |
| 26 |
|
| 27 |
keep_only_tags = [dict(name='div', attrs={'id': ['article']})] |
| 28 |
|
| 29 |
feeds = [('news', 'http://feeds.dzone.com/javalobby/frontpage')] |
| 30 |
|
| 31 |
def get_article_url(self, article): |
| 32 |
|
| 33 |
url = article.get('link', None) |
| 34 |
|
| 35 |
return url |