Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/mikan url config #489

Merged
merged 4 commits into from
Apr 23, 2023
Merged

Conversation

codysk
Copy link
Member

@codysk codysk commented Apr 23, 2023

从前两天开始大陆地区访问不到 mikanani.me 了,这个 pr 给 mikan 增加了镜像站配置的支持。

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Merging #489 (682c1fb) into master (a9a2ce5) will increase coverage by 0.05%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master     #489      +/-   ##
==========================================
+ Coverage   42.19%   42.25%   +0.05%     
==========================================
  Files          32       32              
  Lines        2237     2239       +2     
==========================================
+ Hits          944      946       +2     
  Misses       1293     1293              
Flag Coverage Δ
app ?
downloader 42.25% <80.00%> (+0.05%) ⬆️
front ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
bgmi/website/mikan.py 14.74% <75.00%> (+0.39%) ⬆️
bgmi/config.py 90.59% <100.00%> (+0.08%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@codysk codysk requested a review from trim21 April 23, 2023 02:50
@@ -14,13 +15,13 @@
from bgmi.website.base import BaseWebsite
from bgmi.website.model import Episode, SubtitleGroup, WebsiteBangumi

server_root = "https://mikanani.me/"
server_root = f"{cfg.mikan_url}/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是检查一下最后的slash

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

也行,如果他多打了就帮他干掉

@@ -299,7 +306,7 @@ def search_by_tag(self, tag: str, subtitle: Optional[str] = None, count: Optiona
title_el = item.find("title")
title = title_el.text if title_el is not None else None

xmlns = "{https://mikanani.me/0.1/}"
xmlns = "{" + server_root + "0.1/}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

镜像站也会改写这里的ns吗?

Copy link
Member Author

@codysk codysk Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我实际找了个镜像站测的,确实会改的样子。
image
如果是nginx搭的那种镜像站,应该所有看起来像本站url的东西都会被改掉的。

@trim21 trim21 merged commit 0c2b741 into BGmi:master Apr 23, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants