Skip to content

fix: 修复蓝奏云解析文件链接域名变为 lanzouo 后,is_file_url 和 is_folder_url 判定失败的问题 - #69

Open
fzls wants to merge 2 commits into
zaxtyson:masterfrom
fzls:fix_lanzouo
Open

fix: 修复蓝奏云解析文件链接域名变为 lanzouo 后,is_file_url 和 is_folder_url 判定失败的问题#69
fzls wants to merge 2 commits into
zaxtyson:masterfrom
fzls:fix_lanzouo

Conversation

@fzls

@fzls fzls commented Dec 17, 2021

Copy link
Copy Markdown
Contributor

测试用例

from lanzou.api.utils import is_file_url, is_folder_url

#   1. 去下面这个查备案的网址查 鲁ICP备15001327号 ,看看是否有新的域名备案了
#       https://beian.miit.gov.cn/#/Integrated/recordQuery
all_lanzou_domains = [
    'lanzoup.com',  # 2021-12-10 鲁ICP备15001327号-16
    'lanzout.com',  # 2021-12-10 鲁ICP备15001327号-15
    'lanzouy.com',  # 2021-12-10 鲁ICP备15001327号-14
    'lanzoul.com',  # 2021-12-10 鲁ICP备15001327号-13
    'lanzoug.com',  # 2021-12-10 鲁ICP备15001327号-12
    'lanzouv.com',  # 2021-12-10 鲁ICP备15001327号-11
    'lanzouj.com',  # 2021-12-10 鲁ICP备15001327号-10
    'lanzouq.com',  # 2021-12-10 鲁ICP备15001327号-9
    'lanzouo.com',  # 2021-09-15 鲁ICP备15001327号-8
    'lanzouw.com',  # 2021-09-02 鲁ICP备15001327号-7
    'lanzoui.com',  # 2020-06-09 鲁ICP备15001327号-6
    'lanzoux.com',  # 2020-06-09 鲁ICP备15001327号-5
]


def test_is_file_url():
    # 确保每个备案的域名都能正确判定
    for domain in all_lanzou_domains:
        assert is_file_url(f'https://pan.{domain}/i1234abcd')


def test_is_folder_url():
    # 确保每个备案的域名都能正确判定
    for domain in all_lanzou_domains:
        assert is_folder_url(f'https://pan.{domain}/b1234abcd')

zaxtyson added a commit that referenced this pull request Dec 30, 2021
@zaxtyson

Copy link
Copy Markdown
Owner

最近有点忙, 发现代码半个月前的代码忘了 push 上来🤣, 已经更新到 master 分支了. 我记得测了lanzou[a-z]的可用状态, 贴了图回复来着,居然也没发出来, 抱歉抱歉.

@fzls

fzls commented Dec 30, 2021

Copy link
Copy Markdown
Contributor Author

最近有点忙, 发现代码半个月前的代码忘了 push 上来🤣, 已经更新到 master 分支了. 我记得测了lanzou[a-z]的可用状态, 贴了图回复来着,居然也没发出来, 抱歉抱歉.

估计很久不用修改了哈哈哈,这次蓝奏云加了一大堆域名,快注册满字母表了

@zaxtyson

Copy link
Copy Markdown
Owner

上次测试 a-z 全国能用的就只有几个, 他们干脆换个域名得了🙈 到时候 a-z 都 gg 了看他们怎么加

@fzls

fzls commented Dec 30, 2021

Copy link
Copy Markdown
Contributor Author

上次测试 a-z 全国能用的就只有几个, 他们干脆换个域名得了🙈 到时候 a-z 都 gg 了看他们怎么加

lanzouaa -> lanzouzz 又是五百多个哈哈哈

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.

2 participants