Skip to content

Commit

Permalink
[weibo] accept status URLs with non-numeric IDs (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Mar 31, 2020
1 parent a0111ed commit 699036e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gallery_dl/extractor/weibo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2019 Mike Fährmann
# Copyright 2019-2020 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -118,7 +118,7 @@ class WeiboStatusExtractor(WeiboExtractor):
"""Extractor for images from a status on weibo.cn"""
subcategory = "status"
pattern = (r"(?:https?://)?(?:www\.|m\.)?weibo\.c(?:om|n)"
r"/(?:detail|status|\d+)/(\d+)")
r"/(?:detail|status|\d+)/(\w+)")
test = (
("https://m.weibo.cn/detail/4323047042991618", {
"pattern": r"https?://wx\d+.sinaimg.cn/large/\w+.jpg",
Expand All @@ -130,6 +130,10 @@ class WeiboStatusExtractor(WeiboExtractor):
("https://m.weibo.cn/status/4268682979207023", {
"exception": exception.NotFoundError,
}),
# non-numeric status ID (#664)
("https://weibo.com/3314883543/Iy7fj4qVg", {
"pattern": r"https?://f.video.weibocdn.com/\w+\.mp4\?label=mp4_hd",
}),
("https://m.weibo.cn/status/4339748116375525"),
("https://m.weibo.cn/5746766133/4339748116375525"),
)
Expand Down

0 comments on commit 699036e

Please sign in to comment.