Skip to content

Commit

Permalink
fix: image link may be a relative link
Browse files Browse the repository at this point in the history
bump to version v0.7.2
  • Loading branch information
NobeKanai committed Apr 29, 2024
1 parent 7b532c4 commit 2ee8bac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dvtag/scrape.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import re
from html import unescape
from urllib.parse import urljoin

from .doujinvoice import DoujinVoice
from .utils import create_request_session
Expand Down Expand Up @@ -36,7 +37,7 @@ def scrape(workno: str) -> DoujinVoice:
raise ParsingError(f"no work name found", workno)

if m := re.search(r"\"og:image\"[\s\S]*?content=\"(.+?)\"", html):
image_url = m.group(1)
image_url = urljoin("https://www.dlsite.com", m.group(1))
else:
raise ParsingError(f"no cover image url found", workno)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = dvtag
version = 0.7.1
version = 0.7.2
author = Nobe Kanai
author_email = [email protected]
description = A tool for tagging your doujin voice library.
Expand Down

0 comments on commit 2ee8bac

Please sign in to comment.