Skip to content

Commit c780001

Browse files
committed
fix: parenthesize multi-catch that only parses on 3.14
PEP 758 syntax requires Python 3.14, but the script metadata declares requires-python >= 3.13. Reported by ty check run per #15187.
1 parent 215c1f0 commit c780001

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎web_programming/instagram_crawler.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_json(self) -> dict:
5353
scripts = BeautifulSoup(html, "html.parser").find_all("script")
5454
try:
5555
return extract_user_profile(scripts[4])
56-
except json.decoder.JSONDecodeError, KeyError:
56+
except (json.decoder.JSONDecodeError, KeyError):
5757
return extract_user_profile(scripts[3])
5858

5959
def __repr__(self) -> str:

0 commit comments

Comments
 (0)