Skip to content

Commit

Permalink
[vk] fix URLs for older photos (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed May 2, 2022
1 parent 3346f58 commit 5b7423d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gallery_dl/extractor/vk.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def items(self):
photo["url"], photo["width"], photo["height"] = photo[size]
except ValueError:
# photo without width/height entries (#2535)
photo["url"] = photo[size][0]
photo["url"] = photo[size + "src"]
photo["width"] = photo["height"] = 0

photo["id"] = photo["id"].rpartition("_")[2]
Expand Down Expand Up @@ -125,8 +125,9 @@ class VkPhotosExtractor(VkExtractor):
}),
# photos without width/height (#2535)
("https://vk.com/id76957806", {
"range": "1-5",
"count": 5,
"pattern": r"https://sun\d+-\d+\.userapi\.com/",
"range": "1-9",
"count": 9,
}),
("https://m.vk.com/albums398982326"),
("https://www.vk.com/id398982326?profile=1"),
Expand Down

0 comments on commit 5b7423d

Please sign in to comment.