View Single Post
Old 11-09-2015, 02:39 PM   #1
tom_a_sparks
Member
tom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheesetom_a_sparks can extract oil from cheese
 
Posts: 21
Karma: 1010
Join Date: Dec 2011
Device: sony reader PRS-T1, kobo touch
Gamasutra recipes broken

Gamasutra recipes are broken, I got them working, but because the printable version is no longer work they just dont have the articles

gamasutra_fa.recipe:
Code:
__license__   = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
gamasutra.com
'''

import re
from calibre.web.feeds.news import BasicNewsRecipe

class Gamasutra(BasicNewsRecipe):
    title                 = 'Gamasutra Featured articles'
    __author__            = 'Darko Miletic'
    description           = 'The Art and Business of Making Games'
    publisher             = 'Gamasutra'
    category              = 'news, games, IT'
    oldest_article        = 2
    max_articles_per_feed = 200
    no_stylesheets        = True
    encoding              = 'cp1252'
    use_embedded_content  = False
    language              = 'en'
    remove_empty_feeds    = True
    masthead_url          = 'http://www.gamasutra.com/images/gamasutra_logo.gif'
    extra_css             = ' body{font-family: Verdana,Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} .title{font-size: x-large; font-weight: bold} '

    conversion_options = {
                          'comment'          : description
                        , 'tags'             : category
                        , 'publisher'        : publisher
                        , 'language'         : language
                        , 'linearize_tables' : True
                        }

    feeds = [(u'Feature Articles', u'http://feeds.feedburner.com/GamasutraFeatureArticles')]



    def preprocess_html(self, soup):
        for item in soup.findAll(style=True):
            del item['style']
        return self.adeify_images(soup)
gamasutra_news.recipe
Code:
__license__   = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
gamasutra.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Gamasutra(BasicNewsRecipe):
    title                 = 'Gamasutra News'
    __author__            = 'Darko Miletic'
    description           = 'The Art and Business of Making Games'
    publisher             = 'Gamasutra'
    category              = 'news, games, IT'
    oldest_article        = 2
    max_articles_per_feed = 200
    no_stylesheets        = True
    encoding              = 'cp1252'
    use_embedded_content  = False
    language              = 'en'
    remove_empty_feeds    = True
    masthead_url          = 'http://www.gamasutra.com/images/gamasutra_logo.gif'
    extra_css             = ' body{font-family: Verdana,Arial,Helvetica,sans-serif } img{margin-bottom: 0.4em} .newsTitle{font-size: xx-large; font-weight: bold} '
    conversion_options = {
                          'comment'          : description
                        , 'tags'             : category
                        , 'publisher'        : publisher
                        , 'language'         : language
                        , 'linearize_tables' : True
                        }


    feeds = [(u'News', u'http://feeds.feedburner.com/GamasutraNews')]



    def preprocess_html(self, soup):
        for item in soup.findAll(style=True):
            del item['style']
        return self.adeify_images(soup)
tom_a_sparks is offline   Reply With Quote