mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-10 11:40:24 +08:00
Fimfiction adapter: fixing img tag urls missing http:
This commit is contained in:
@@ -304,5 +304,11 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
|
||||
soup = bs.BeautifulSoup(data,selfClosingTags=('br','hr')).find('div', {'class' : 'chapter_content'})
|
||||
if soup == None:
|
||||
raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url)
|
||||
|
||||
# fix for img urls missing 'http:'
|
||||
images = soup.findAll('img')
|
||||
for imagetag in images:
|
||||
if (not imagetag['src'] is None) and (imagetag['src'].startswith('//')):
|
||||
imagetag['src'] = "http:"+imagetag['src']
|
||||
|
||||
return self.utf8FromSoup(url,soup)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user