Fix RuntimeError due to dict changing
This commit is contained in:
parent
ab3dd09251
commit
438c5d36b6
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ def preview_url(
|
||||||
if tag_name in (*VALID_OG_TAGS, *TWITTER_MAPPING.keys()):
|
if tag_name in (*VALID_OG_TAGS, *TWITTER_MAPPING.keys()):
|
||||||
og_tags[tag_name] = tag.get("content")
|
og_tags[tag_name] = tag.get("content")
|
||||||
|
|
||||||
for tag in og_tags.keys():
|
for tag in og_tags.copy().keys():
|
||||||
if tag.startswith("twitter:"):
|
if tag.startswith("twitter:"):
|
||||||
if tag in TWITTER_MAPPING:
|
if tag in TWITTER_MAPPING:
|
||||||
og_tags[TWITTER_MAPPING[tag]] = og_tags.pop(tag)
|
og_tags[TWITTER_MAPPING[tag]] = og_tags.pop(tag)
|
||||||
|
|
Loading…
Reference in a new issue