From f024af31b037c6734180c7533645979106896858 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 8 Apr 2013 08:44:37 +0530 Subject: [PATCH] Update Tom's Hardware --- recipes/tomshardware.recipe | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/recipes/tomshardware.recipe b/recipes/tomshardware.recipe index c75b19189d..e0f21ae2a4 100644 --- a/recipes/tomshardware.recipe +++ b/recipes/tomshardware.recipe @@ -1,7 +1,5 @@ -#!/usr/bin/env python - __license__ = 'GPL v3' -__copyright__ = '2008-2009, Darko Miletic ' +__copyright__ = '2008-2013, Darko Miletic ' ''' tomshardware.com/us ''' @@ -16,22 +14,20 @@ class Tomshardware(BasicNewsRecipe): publisher = "Tom's Hardware" category = 'news, IT, hardware, USA' no_stylesheets = True - needs_subscription = True - language = 'en' - + needs_subscription = 'optional' + language = 'en' INDEX = 'http://www.tomshardware.com' LOGIN = INDEX + '/membres/' remove_javascript = True use_embedded_content= False - html2lrf_options = [ - '--comment', description - , '--category', category - , '--publisher', publisher - ] - - html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' - + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + def get_browser(self): br = BasicNewsRecipe.get_browser(self) br.open(self.INDEX+'/us/') @@ -50,8 +46,8 @@ class Tomshardware(BasicNewsRecipe): ] feeds = [ - (u'Latest Articles', u'http://www.tomshardware.com/feeds/atom/tom-s-hardware-us,18-2.xml' ) - ,(u'Latest News' , u'http://www.tomshardware.com/feeds/atom/tom-s-hardware-us,18-1.xml') + (u'Reviews', u'http://www.tomshardware.com/feeds/rss2/tom-s-hardware-us,18-2.xml') + ,(u'News' , u'http://www.tomshardware.com/feeds/rss2/tom-s-hardware-us,18-1.xml') ] def print_version(self, url):