binux / pyspider

A Powerful Spider(Web Crawler) System in Python.
http://docs.pyspider.org/
Apache License 2.0
16.49k stars 3.69k forks source link

The CDN unaipay is not available ? #82

Open jiangrzh opened 9 years ago

jiangrzh commented 9 years ago

The CDN unaipay is not available ?

binux commented 9 years ago

How do you specify the CDN?

jiangrzh commented 9 years ago

default setting in the code

binux commented 9 years ago

May I ask what does "unaipay" mean?

jiangrzh commented 9 years ago

i saw this in the code: file: app.py

 cdn = app.config.get('cdn', '//cdnjscn.b0.upaiyun.com/libs/')

you can also open the debug on demo. is report many errors in console:

qq 20150118113231

binux commented 9 years ago

ok, you can change it using a config.json file like:

{
  "webui": {
    "cdn": "//cdnjs.cloudflare.com/ajax/libs/"
  }
}

start pyspider with command pyspider -c config.json

or just uncomment the code near the line you pointed in app.py.

jiangrzh commented 9 years ago

thank you, and can you fix the demo site ,plz?

binux commented 9 years ago

cloudflare sometimes not available in China, upaiyun is a substitute.

jiangrzh commented 9 years ago

看起来像是现在upaiyun的cdn不能访问了,能帮忙把http://demo.pyspider.org/下的cdn源改下么? 想学习下demo里面的例子,谢谢

binux commented 9 years ago

Where are you? I can visit from Beijing.

jiangrzh commented 9 years ago

guangzhou

imlonghao commented 9 years ago

I think this is your problem and you can contact upyun.com for help. On my point, Upyun is a reliable service like qiniu and any like that, so it shouldn't have such problem like you. If an area can not visit upyun's service for such a long time, this is a major problem. Foshan is OK.

Best wishes, imlonghao

-------- 原始邮件 -------- 发件人:Jiangrz notifications@github.com 时间:周日 1月18日 15:53 收件人:binux/pyspider pyspider@noreply.github.com 主题:Re: [pyspider] The CDN unaipay is not available ? (#82)

guangzhou


Reply to this email directly or view it on GitHub: https://github.com/binux/pyspider/issues/82#issuecomment-70399636

lhyfree commented 9 years ago

Can I use local static files instead of the CDN via configfile ?

Beause of firewall in my work network, the most CDN can‘t work.

imlonghao commented 9 years ago

webui中设置cdn --cdn JS/CSS libs CDN service, URL must compatible with cdnjs 可以使用你本地的只要需要的js/css都存在的话 Sent using CloudMagic On 周四, 2月 05, 2015 at 3:25 下午, lhy notifications@github.com wrote:可以通过配置文件改成使用本地的静态文件吗?公司网络有墙,很多cdn失效。

—Reply to this email directly or view it on GitHub.

binux commented 9 years ago

After some search, I cannot find a way to download the libs to local. If it's done, you can change the CDN prefix by --cdn option in webui

imlonghao commented 9 years ago

We just need some js/css files so could we can download it maunally? Another idea, use nginx proxy cache. Cache it in vps then copy it to localhost Sent using CloudMagic