-
Notifications
You must be signed in to change notification settings - Fork 55
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
添加对 lofter 的支持 #46
Labels
enhancement
New feature or request
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
网易 Lofter 也是中国同人/内容产出的一个重要平台,但是目前 nazurin 并没有进行支持。
Describe the solution you'd like
lofter 分享的 URL 为
[blogName].lofter.com/post/[post-hash]
,使用移动端 UA 会返回一段 json,包裹在<script>"window.__initialize_data__ = {}</script>"
中,其中包含了该 post 在网易后端唯一的 postid 和 blogId。e.g.
https://wuyayayayaya.lofter.com/post/1e8b623c_12d0a4293
使用以下 UA 请求
会得到如 json
原始图片是 photolink section 的第一个?长宽分别为
ow
与oh
这部分可以直接提取出图片,或者使用 id 与 blogid 向 lofter app API 请求
https://api.lofter.com/oldapi/post/detail.api
request body 为 plain text,格式为
postid=[id]&supportposttypes=1%2C2%2C3%2C4%2C5%2C6&targetblogid=[blogid]
request header 可能需要带上 lofter app 的 UA,并且原始请求也携带了
securityinfo
与cookie
两个 header,不清楚在机房环境下会出现什么验证azure hk 测试无验证家宽和机房均使用以下 curl 测试
返回为如下 json
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Lofter 和其他平台的 URL 格式不同,为
[blogName].lofter.com/post/[post-hash]
,不接受使用主域名www.lofter.com
替换博客域名进行请求,而目前 nazurin 只会对 URI 部分 parse,可能添加支持要 3.0 改掉 parse 逻辑才有机会了吧。The text was updated successfully, but these errors were encountered: