Permalink
Browse files

Fix the detection of meta name=og:image thumbnails

  • Loading branch information...
1 parent 3bc028c commit 0a88e507731aee941eca6d78249ae5cccbadd328 @johndrinkwater johndrinkwater committed with spladug Jun 18, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 r2/r2/lib/scraper.py
View
@@ -201,7 +201,8 @@ def largest_image_url(self):
max_url = None
if self.soup:
- og_image = self.soup.find('meta', property='og:image')
+ og_image = (self.soup.find('meta', property='og:image') or
+ self.soup.find('meta', attrs={'name': 'og:image'}))
if og_image and og_image['content']:
log.debug("Using og:image")
return og_image['content']

0 comments on commit 0a88e50

Please sign in to comment.