From 0a88e507731aee941eca6d78249ae5cccbadd328 Mon Sep 17 00:00:00 2001 From: John Drinkwater Date: Tue, 18 Jun 2013 11:35:40 +0100 Subject: [PATCH] Fix the detection of meta name=og:image thumbnails --- r2/r2/lib/scraper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/scraper.py b/r2/r2/lib/scraper.py index 766b9dd21..c1285f953 100644 --- a/r2/r2/lib/scraper.py +++ b/r2/r2/lib/scraper.py @@ -201,7 +201,8 @@ class Scraper: 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']