aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLesmiscore <nao20010128@gmail.com>2022-04-07 20:21:42 +0900
committerLesmiscore <nao20010128@gmail.com>2022-04-07 20:21:42 +0900
commitb52e788eb2ba9914aa812238365dcb3348be2944 (patch)
treed502c6944f0d6f81cf6d017712ab11e289bb25ea
parent316f2650f8b588507159cddcd13941dd67a4f70c (diff)
downloadhypervideo-pre-b52e788eb2ba9914aa812238365dcb3348be2944.tar.lz
hypervideo-pre-b52e788eb2ba9914aa812238365dcb3348be2944.tar.xz
hypervideo-pre-b52e788eb2ba9914aa812238365dcb3348be2944.zip
[Piapro] Extract description with break lines
Authored by: Lesmiscore Closes #3334
-rw-r--r--yt_dlp/extractor/piapro.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/yt_dlp/extractor/piapro.py b/yt_dlp/extractor/piapro.py
index c4eb4913f..ae160623b 100644
--- a/yt_dlp/extractor/piapro.py
+++ b/yt_dlp/extractor/piapro.py
@@ -27,6 +27,18 @@ class PiaproIE(InfoExtractor):
'title': '裏表ラバーズ',
'thumbnail': r're:^https?://.*\.jpg$',
}
+ }, {
+ 'note': 'There are break lines in description, mandating (?s) flag',
+ 'url': 'https://piapro.jp/t/9cSd',
+ 'md5': '952bb6d1e8de95050206408a87790676',
+ 'info_dict': {
+ 'id': '9cSd',
+ 'ext': 'mp3',
+ 'title': '青に溶けた風船 / 初音ミク',
+ 'description': 'md5:d395a9bd151447631a5a1460bc7f9132',
+ 'uploader': 'シアン・キノ',
+ 'uploader_id': 'cyankino',
+ }
}]
_login_status = False
@@ -81,7 +93,7 @@ class PiaproIE(InfoExtractor):
return {
'id': video_id,
'title': self._html_search_regex(r'<h1\s+class="cd_works-title">(.+?)</h1>', webpage, 'title', fatal=False),
- 'description': self._html_search_regex(r'<p\s+class="cd_dtl_cap">(.+?)</p>\s*<div', webpage, 'description', fatal=False),
+ 'description': self._html_search_regex(r'(?s)<p\s+class="cd_dtl_cap">(.+?)</p>\s*<div', webpage, 'description', fatal=False),
'uploader': uploader,
'uploader_id': uploader_id,
'timestamp': unified_timestamp(create_date, False),