aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn R. Gärtner <65015656+FinnRG@users.noreply.github.com>2023-07-14 20:09:02 +0200
committerGitHub <noreply@github.com>2023-07-14 23:39:02 +0530
commit1bcb9fe8715b1f288efc322be3de409ee0597080 (patch)
treef5b7b781a27798619b33ad895a0b797af19fa87f
parent8a4cd12c8f8e93292e3e95200b9d17a3af39624c (diff)
downloadhypervideo-pre-1bcb9fe8715b1f288efc322be3de409ee0597080.tar.lz
hypervideo-pre-1bcb9fe8715b1f288efc322be3de409ee0597080.tar.xz
hypervideo-pre-1bcb9fe8715b1f288efc322be3de409ee0597080.zip
[ie/piapro] Support `/content` URL (#7592)
Authored by: FinnRG
-rw-r--r--yt_dlp/extractor/piapro.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/yt_dlp/extractor/piapro.py b/yt_dlp/extractor/piapro.py
index d8d9c7801..eb5923d11 100644
--- a/yt_dlp/extractor/piapro.py
+++ b/yt_dlp/extractor/piapro.py
@@ -12,17 +12,22 @@ from ..utils import (
class PiaproIE(InfoExtractor):
_NETRC_MACHINE = 'piapro'
- _VALID_URL = r'https?://piapro\.jp/t/(?P<id>\w+)/?'
+ _VALID_URL = r'https?://piapro\.jp/(?:t|content)/(?P<id>\w+)/?'
_TESTS = [{
'url': 'https://piapro.jp/t/NXYR',
- 'md5': 'a9d52f27d13bafab7ee34116a7dcfa77',
+ 'md5': 'f7c0f760913fb1d44a1c45a4af793909',
'info_dict': {
'id': 'NXYR',
'ext': 'mp3',
'uploader': 'wowaka',
'uploader_id': 'wowaka',
'title': '裏表ラバーズ',
- 'thumbnail': r're:^https?://.*\.jpg$',
+ 'description': 'http://www.nicovideo.jp/watch/sm8082467',
+ 'duration': 189.0,
+ 'timestamp': 1251785475,
+ 'thumbnail': r're:^https?://.*\.(?:png|jpg)$',
+ 'upload_date': '20090901',
+ 'view_count': int,
}
}, {
'note': 'There are break lines in description, mandating (?s) flag',
@@ -34,8 +39,16 @@ class PiaproIE(InfoExtractor):
'title': '青に溶けた風船 / 初音ミク',
'description': 'md5:d395a9bd151447631a5a1460bc7f9132',
'uploader': 'シアン・キノ',
+ 'duration': 229.0,
+ 'timestamp': 1644030039,
+ 'upload_date': '20220205',
+ 'view_count': int,
+ 'thumbnail': r're:^https?://.*\.(?:png|jpg)$',
'uploader_id': 'cyankino',
}
+ }, {
+ 'url': 'https://piapro.jp/content/hcw0z3a169wtemz6',
+ 'only_matching': True
}]
_login_status = False