fix: poster link update bug.

This commit is contained in:
EstrellaXD
2023-09-28 16:56:37 +08:00
parent a4f1bbd15f
commit a0b6af3117
2 changed files with 2 additions and 10 deletions

View File

@@ -16,7 +16,8 @@ def from_30_to_31():
if rss_link not in rss_pool and not re.search(r"\d+.\d+.\d+.\d+", rss_link):
rss_pool.append(rss_link)
root_path = parse_url(rss_link).host
bangumi.poster_link = f"https://{root_path}{bangumi.poster_link}"
if "://" not in bangumi.poster_link:
bangumi.poster_link = f"https://{root_path}{bangumi.poster_link}"
db.bangumi.update_all(bangumis)
for rss in rss_pool:
if "mybangumi" in rss.lower():

View File

@@ -79,13 +79,4 @@ def test_raw_parser():
assert info.episode == 13
assert info.season == 1
content = "[星空字幕组&LoliHouse] 五等分的新娘∽ / Go-toubun no Hanayome ∽ 01 [WebRip 1080p HEVC-10bit AAC][简繁日内封字幕](检索用:暑假篇)"
info = raw_parser(content)
assert info.group == "星空字幕组&LoliHouse"
assert info.title_zh == "五等分的新娘∽"
assert info.title_jp == "Go-toubun no Hanayome ∽"
assert info.resolution == "1080p"
assert info.episode == 1
assert info.season == 1