Fixed crash when img src tag is missing
This commit is contained in:
parent
4f4f2aba6f
commit
f957c53c41
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ def cleanUp(soup):
|
|||
|
||||
def changeImgSrcAttr(soup):
|
||||
# Use s attribute instead of src for images
|
||||
for imgElement in soup.findAll("img"):
|
||||
for imgElement in soup.select('img[src]'):
|
||||
imgElement["s"] = imgElement["src"]
|
||||
del imgElement["src"]
|
||||
|
||||
|
|
Reference in a new issue