From 699036ea0c97e7e72b8f16521c4f380173c9ac0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 31 Mar 2020 22:27:16 +0200 Subject: [PATCH] [weibo] accept status URLs with non-numeric IDs (#664) --- gallery_dl/extractor/weibo.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/weibo.py b/gallery_dl/extractor/weibo.py index 6a779d99dd9..9539c2f90d3 100644 --- a/gallery_dl/extractor/weibo.py +++ b/gallery_dl/extractor/weibo.py @@ -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 @@ -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", @@ -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"), )