Fix image embed check in file processing
Corrected the logic for identifying image files without an embedded type by fixing the misplaced quotation marks in the conditional. This change ensures that the correct files are appended with proxy URLs for step images. Additionally, removed unnecessary whitespace for cleaner code structure.
This commit is contained in:
parent
dfe7882b12
commit
5e99720328
1 changed files with 1 additions and 2 deletions
3
main.py
3
main.py
|
@ -957,7 +957,7 @@ def route_article(article):
|
|||
|
||||
for file in step["files"]:
|
||||
print(file)
|
||||
if file["image"] and not "embedType" in file:
|
||||
if file["image"] and not "embedType" in "file":
|
||||
step_imgs.append(
|
||||
{"src": proxy(file["downloadUrl"]), "alt": file["name"]}
|
||||
)
|
||||
|
@ -969,7 +969,6 @@ def route_article(article):
|
|||
|
||||
else: # Leaves us with embeds
|
||||
embed_code = file["embedHtmlCode"]
|
||||
|
||||
soup = BeautifulSoup(embed_code, "html.parser")
|
||||
|
||||
iframe = soup.select("iframe")[0]
|
||||
|
|
Loading…
Reference in a new issue