mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Fix the detection of meta name=og:image thumbnails
This commit is contained in:
committed by
Neil Williams
parent
3bc028c712
commit
0a88e50773
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user