mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-09 11:14:08 +08:00
Fixed checking for "src" attribute, preventing a potential bug if the site ever decides to change its image handling
This commit is contained in:
@@ -308,7 +308,7 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
|
||||
# fix for img urls missing 'http:'
|
||||
images = soup.findAll('img')
|
||||
for imagetag in images:
|
||||
if (not imagetag['src'] is None) and (imagetag['src'].startswith('//')):
|
||||
if 'src' in imagetag.attrs and imagetag['src'].startswith('//'):
|
||||
imagetag['src'] = "http:"+imagetag['src']
|
||||
|
||||
return self.utf8FromSoup(url,soup)
|
||||
|
||||
Reference in New Issue
Block a user