mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
27 lines
1023 B
Plaintext
27 lines
1023 B
Plaintext
__license__ = 'GPL v3'
|
|
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
|
|
class AdvancedUserRecipe1327434170(BasicNewsRecipe):
|
|
title = u"Tom's Hardware"
|
|
oldest_article = 7
|
|
max_articles_per_feed = 100
|
|
auto_cleanup = True
|
|
masthead_url = 'http://userlogos.org/files/logos/spaljeni/tomshardwre.png'
|
|
|
|
def get_article_url(self, article):
|
|
link = BasicNewsRecipe.get_article_url(self, article)
|
|
if link.split('/')[-1] == "story01.htm":
|
|
link = link.split('/')[-2]
|
|
a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'I', 'L', 'N', 'S']
|
|
b = ['0', '.', '/', '?', '-', '=', '&',
|
|
'_', 'http://', '.com', 'www.']
|
|
for i in range(0, len(a)):
|
|
link = link.replace('0' + a[-i], b[-i])
|
|
return link
|
|
feeds = [
|
|
(u"Tom's Hardware", u'http://rss.feedsportal.com/c/32604/f/531080/index.rss')]
|
|
__author__ = 'faber1971'
|
|
description = 'Italian website on technology - v1.00 (28, January 2012)'
|
|
language = 'it'
|