mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-10-30 12:50:24 +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:
1 parent
d7103969e7
commit
72a5624330
1 file changed
+1
-1
@@ -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