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

无法运行demo.py #74

Closed
Nekoer opened this issue Apr 28, 2019 · 6 comments
Closed

无法运行demo.py #74

Nekoer opened this issue Apr 28, 2019 · 6 comments
Labels

Comments

@Nekoer
Copy link

Nekoer commented Apr 28, 2019

82SL85BLYI NU )TG`JTSW

在win7上运行的,python3

@Xdynix
Copy link
Collaborator

Xdynix commented Apr 28, 2019

Pixiv被墙。在开启相应科技后,修改

_REQUESTS_KWARGS = {
  # 'proxies': {
  #   'https': 'http://127.0.0.1:1087',
  # },
  # 'verify': False,       # PAPI use https, an easy way is disable requests SSL verify
}

中的proxies至对应的值。以及记得取消注释。

@Nekoer
Copy link
Author

Nekoer commented Apr 28, 2019

解决了,谢谢大佬。
大佬知道怎么弄成网址api吗

@Xdynix
Copy link
Collaborator

Xdynix commented Apr 28, 2019

你是指 #73example_api_proxy.py

@Nekoer
Copy link
Author

Nekoer commented Apr 28, 2019

是的大佬
类似https://api.imjad.cn/pixiv_v2.md这种的

@Xdynix
Copy link
Collaborator

Xdynix commented Apr 28, 2019

我不是很明白你的意思。
如果是要替换API的host实现免翻,那 #73 里已经讲解了。
如果是要自己部署一个API服务或者网页服务让别人访问Pixiv,那要做的就多了,需要使用Django、Flask之类的框架开发,租一台服务器部署等。

@upbit
Copy link
Owner

upbit commented Apr 28, 2019

嗯,我开始也理解错了。你说的是搭建一个类似 https://api.imjad.cn/pixiv_v2.md 的代理页面,这个类似 @Xdynix 介绍的要通过Flask之类的Web框架,通过服务器实现


#73 的修改不是让pixivpy直接工作于墙后。因为auth登录(获取access_token)这个会明文暴露用户名密码,给代理提供方,出于安全考虑不会集成在api中

如果你想测试,可以参考Pixivlite登录验证这个接口,通过PixivLite.com的代理来获取。

不然还是免不了像 example_api_proxy.py 里的,先挂代理login一次

@upbit upbit added the question label Apr 28, 2019
@upbit upbit closed this as completed May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants