1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 12:12:34 +01:00

[naver] unescape post 'title' and 'description'

This commit is contained in:
Mike Fährmann 2024-03-06 00:46:19 +01:00
parent a71cdab53e
commit f296067797
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 6 additions and 4 deletions

View File

@ -47,8 +47,10 @@ class NaverPostExtractor(NaverBase, GalleryExtractor):
extr = text.extract_from(page) extr = text.extract_from(page)
data = { data = {
"post": { "post": {
"title" : extr('"og:title" content="', '"'), "title" : text.unescape(extr(
"description": extr('"og:description" content="', '"'), '"og:title" content="', '"')),
"description": text.unescape(extr(
'"og:description" content="', '"')).replace(" ", " "),
"num" : text.parse_int(self.post_id), "num" : text.parse_int(self.post_id),
}, },
"blog": { "blog": {

View File

@ -41,9 +41,9 @@ __tests__ = (
}, },
"post": { "post": {
"date" : "dt:2013-03-05 17:48:00", "date" : "dt:2013-03-05 17:48:00",
"description": " ◈     PROMOTER :핑수 ˚ 아담 EDITOR핑수   넵:이크:핑수...", "description": " ◈ PROMOTER :핑수 ˚ 아담 EDITOR핑수 넵:이크:핑수...",
"num" : 70161391809, "num" : 70161391809,
"title" : "[공유] { 합작}  OH, MY GOD! ~ 아 또 무슨 종말을 한다 그래~" "title" : "[공유] { 합작} OH, MY GOD! ~ 아 또 무슨 종말을 한다 그래~",
}, },
"count" : 2, "count" : 2,
"num" : range(1, 2), "num" : range(1, 2),