Skip to content

Commit

Permalink
[blogger] Fix lh*.googleusercontent.com forward slash bug, add suppor…
Browse files Browse the repository at this point in the history
…t for lh*-**.googleusercontent.com

Some URLs use "lh(number)-(locale).googleusercontent.com" format, so I added support for those.

Also, "lh(number).googleusercontent.com" formats were broken because the regex was looking for a second forward slash.

Examples:
lh7.googleusercontent.com
lh7-us.googleusercontent.com
  • Loading branch information
Wiiplay123 authored Jan 20, 2024
1 parent 6f8592e commit a6fed62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gallery_dl/extractor/blogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def items(self):
findall_image = re.compile(
r'src="(https?://(?:'
r'blogger\.googleusercontent\.com/img|'
r'lh\d+\.googleusercontent\.com/|'
r'lh\d+\.googleusercontent\.com|'
r'lh\d+-\w+\.googleusercontent\.com|'
r'\d+\.bp\.blogspot\.com)/[^"]+)').findall
findall_video = re.compile(
r'src="(https?://www\.blogger\.com/video\.g\?token=[^"]+)').findall
Expand Down

0 comments on commit a6fed62

Please sign in to comment.