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

能否增添支持对"基础性作业"的下载 #9

Closed
iamzhz opened this issue Jul 1, 2024 · 2 comments · Fixed by #12
Closed

能否增添支持对"基础性作业"的下载 #9

iamzhz opened this issue Jul 1, 2024 · 2 comments · Fixed by #12
Labels
新增/enhancement New feature or request good first issue Good for newcomers 解析/parsing

Comments

@iamzhz
Copy link
Contributor

iamzhz commented Jul 1, 2024

能否增添支持对形如https://basic.smartedu.cn/syncClassroom/basicWork/detail?contentType=assets_document&contentId=87ae8939-4de5-4413-9c96-de189bc14ddc&catalogType=basicWork的"基础性作业"的下载.

一个貌似可行的方案:
原链接为https://basic.smartedu.cn/syncClassroom/basicWork/detail?contentType=assets_document&contentId=<CONTENTID>&catalogType=basicWork的形式 ,
则其PDF地址为https://r1-ndr.ykt.cbern.com.cn/edu_product/esp/assets/<CONTENTID>.pkg/<科目>作业.%20<年级>年级%20<上或下>册.pdf

emmm,一个貌似更加可行的方案,不需要爬取除contentId外的其他信息

由原URL类似于:https://basic.smartedu.cn/syncClassroom/basicWork/detail?contentType=assets_document&contentId=XXXXXXXXXXX&catalogType=basicWork
中间的XXX暂且称为contentId

可以由contentId直接得到一个json文件:
https://s-file-1.ykt.cbern.com.cn/zxx/ndrs/special_edu/resources/details/XXXXXXXX.json
把它当成字典(们),那么这之中的["ti_items"][1]["ti_storages"][0]就是pdf的url

@wuziqian211 wuziqian211 added 新增/enhancement New feature or request good first issue Good for newcomers labels Jul 8, 2024
@lwkin
Copy link

lwkin commented Aug 20, 2024

大神门,能详细指导一下嘛,我按照你提出的这个解析不了

@iamzhz
Copy link
Contributor Author

iamzhz commented Aug 20, 2024

emmm,一个貌似更加可行的方案,不需要爬取除contentId外的其他信息

由原URL类似于:https://basic.smartedu.cn/syncClassroom/basicWork/detail?contentType=assets_document&contentId=XXXXXXXXXXX&catalogType=basicWork
中间的XXX暂且称为contentId

可以由contentId直接得到一个json文件:
https://s-file-1.ykt.cbern.com.cn/zxx/ndrs/special_edu/resources/details/XXXXXXXX.json
把它当成字典(们),那么这之中的["ti_items"][1]["ti_storages"][0]就是pdf的url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
新增/enhancement New feature or request good first issue Good for newcomers 解析/parsing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants