View Single Post
Old 01-13-2011, 06:50 PM   #1
Tegan
Connoisseur
Tegan began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Jan 2011
Device: Kindle 1st Gen, Kindle 3 SO
Help with Recipe - Image Sizes

After my unexpected success with the newspaper recipes (my degree is in English, not programming!) I decided to try making a recipe that grabs my favorite webcomic, Girl Genius. I managed to get the thing working ok, but the image size is strange. Basically, it's too small to be readable. Anyone know why the size of the image is being reduced? On the original page, it's width is 700 pixels.

Here's the code.

Code:
class GirlGeniusWebcomicRecipe(BasicNewsRecipe):
    title          = u'___Girl Genius @ LJ'
    description    = 'The Adventures of Agatha Heterodyne, Girl Genius.'
    __author__     = 'Laura Gjovaag'
    oldest_article        = 10
    max_articles_per_feed = 5
    reverse_article_order = True
    no_stylesheets        = True
    remove_javascript     = True
    keep_only_tags = [
                      dict(name='div', attrs={'class':'entry'}),
                      ]
    remove_tags    = [
                      dict(name='div', attrs={'class':['entrylinks', 'minicomment']}),
                      ]
    extra_css = 'h1{font: bold 140%;}'

    feeds          = [(u'Girl Genius', u'http://girlgeniuscomic.livejournal.com/data/rss')]
I tried messing around with image_url_processor, but I couldn't figure it out. I just don't know enough python, I guess. I also tried adding
Code:
def preprocess_html(self, soup):
        return self.adeify_images(soup)
but it didn't help. Any ideas?
Tegan is offline   Reply With Quote