Skip to content

Commit

Permalink
[naver] unescape post 'title' and 'description'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Mar 5, 2024
1 parent a71cdab commit f296067
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions gallery_dl/extractor/naver.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def metadata(self, page):
extr = text.extract_from(page)
data = {
"post": {
"title" : extr('"og:title" content="', '"'),
"description": extr('"og:description" content="', '"'),
"title" : text.unescape(extr(
'"og:title" content="', '"')),
"description": text.unescape(extr(
'"og:description" content="', '"')).replace(" ", " "),
"num" : text.parse_int(self.post_id),
},
"blog": {
Expand Down
4 changes: 2 additions & 2 deletions test/results/naver.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
},
"post": {
"date" : "dt:2013-03-05 17:48:00",
"description": " ◈     PROMOTER :핑수 ˚ 아담 EDITOR:핑수   넵:이크:핑수...",
"description": "PROMOTER :핑수 ˚ 아담 EDITOR:핑수 넵:이크:핑수...",
"num" : 70161391809,
"title" : "[공유] { 합작}  OH, MY GOD! ~ 아 또 무슨 종말을 한다 그래~"
"title" : "[공유] {합작} OH, MY GOD! ~ 아 또 무슨 종말을 한다 그래~",
},
"count" : 2,
"num" : range(1, 2),
Expand Down

0 comments on commit f296067

Please sign in to comment.