Skip to content

Commit

Permalink
fix(google): revise regex for better handling of thumbnail ids
Browse files Browse the repository at this point in the history
  • Loading branch information
NekoAria committed Sep 12, 2024
1 parent f405812 commit efbab28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PicImageSearch/model/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create_thumbnail_dict(script_list: list[PyQuery]) -> dict[str, str]:
"""
thumbnail_dict = {}
base_64_regex = compile(r"data:image/(?:jpeg|jpg|png|gif);base64,[^'\"]+")
id_regex = compile(r"dimg_\d+")
id_regex = compile(r"dimg_[^']+")

for script in script_list:
base_64_match = base_64_regex.findall(script.text())
Expand Down

0 comments on commit efbab28

Please sign in to comment.