Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
429 views
in Technique[技术] by (71.8m points)

爬虫本地跑有数据 服务器跑无数据

问题描述

1.在本地跑(windows系统),数据正常
2.在本地跑(Ubantu虚拟机),数据正常
3.然后放到内网的服务器,也返回了数据但是关键数据全是空
4.放到阿里云服务器,同样,关键数据全是空
5.使用代理,前几个请求数据正常,后边所有响应中关键数据全是空

以上所有测试均是同一段代码。
所以就不放代码了,我把数据贴上来

正常数据:

{"dt":"85.003μs","rxs":{"obs":[{"msg":{"aqi":55,"idx":3114,"attributions":[{"url":"http://worldweather.wmo.int","name":"World Meteorological Organization - surface synoptic observations (WMO-SYNOP)"},{"url":"http://www.shmu.sk/sk/","name":"Slovak hydrometeorological institute (Slovensky hydrometeorologicky ústav)","logo":"Slovakia-SHMu.png"},{"url":"https://waqi.info/","name":"World Air Quality Index Project"}],"city":{"geo":[48.7361083,19.1625274],"name":"Stefanikovo nabrezie, Banska Bystrica, Slovakia","url":"https://aqicn.org/city/slovakia/banska-bystrica/stefanikovo-nabrezie"},"dominentpol":"pm25","iaqi":{"co":{"v":8.5,"t":"2020-06-02 07:00:00"},"dew":{"v":4.4,"t":"2020-06-02 10:00:00"},"h":{"v":50.1,"t":"2020-06-02 10:00:00"},"no2":{"v":22.4,"t":"2020-06-02 08:00:00"},"p":{"v":975.7,"t":"2020-06-02 10:00:00"},"pm10":{"v":35,"t":"2020-06-02 08:00:00"},"pm25":{"v":55,"t":"2020-06-02 08:00:00"},"r":{"v":99,"t":"2020-05-31 14:00:00"},"so2":{"v":5.6,"t":"2020-06-02 08:00:00"},"t":{"v":14.7,"t":"2020-06-02 10:00:00"},"w":{"v":7,"t":"2020-06-02 10:00:00"}},"time":{"s":"2020-06-02 08:00:00","tz":"+02:00","v":1591084800},"obs":{"co":{"e":1,"s":"2020-06-02 07:00:00","d":3600,"m":10,"v":[85,[-14,-3600],[-8,-3600],[-2,-3600],[1,-3600],[-1,-3600],[-2,-3600],[0,-3600],[6,-3600],[3,-3600],[0,-3600],[-7,-3600],[1,-3600],[-1,-3600],[2,-3600],[2,-3600],[0,-3600],[-2,-3600],[0,-3600],[3,-3600],[-3,-3600],[4,-3600],[-2,-3600],[17,-3600],[-12,-7200],[-7,-3600],[-3,-3600],[-1,-3600],[1,-3600],[0,-3600],[2,-3600],[1,-3600],[2,-3600],[2,-3600],[0,-3600],[-2,-3600],[0,-3600],[-1,-3600],[-1,-3600],[0,-3600],[0,-3600],[-1,-3600],[0,-3600],[-1,-3600],[-1,-3600],[-1,-3600],[0,-3600],[0,-3600],[4,-7200],[0,-3600],[-3,-3600],[0,-3600],[-1,-3600],[2,-3600],[4,-3600],[0,-3600],[2,-3600],[-5,-3600],[2,-3600],[-5,-3600],[1,-3600],[0,-3600],[0,-3600],[-1,-3600],[0,-3600],[1,-3600],[0,-3600],[2,-3600],[7,-3600],[-2,-3600],[1,-3600],[-6,-3600],[0,-7200],[1,-3600],[2,-3600],[0,-3600],[3,-3600],[2,-3600],[-1,-3600],[-3,-3600],[-5,-3600],[1,-3600],[0,-3600],[2,-3600],[-1,-3600],[2,-3600],[-2,-3600],[0,-3600],[0,-3600],[1,-3600],[2,-3600],[-1,-3600],[-2,-3600],[-2,-3600],[0,-3600],[-3,-3600],[1,-7200],[0,-3600],[0,-3600],[2,-3600],[1,-3600],[2,-3600],[-2,-3600],[-1,-3600],[2,-3600],[-1,-3600],[-1,-3600],[2,-3600],[2,-3600],[-4,-3600],[2,-3600],[-2,-3600],[4,-3600],[5,-3600],[7,-3600],[-1,-3600],[-4,-3600],[-2,-3600],[1,-3600],[-11,-3600],[-2,-7200],[2,-3600],[1,-3600],[1,-3600],[3,-3600],[3,-3600],[-7,-3600],[0,-3600],[-2,-3600],[1,-3600],[0,-3600],[-2,-3600],[2,-3600],[0,-3600],[1,-3600],[1,-3600],[-3,-3600],[1,-3600],[2,-3600]]},"dew":{"e":1,"s":"2020-06-02 10:00:00","d":3600,"m":10,"v":[44,[1,-3600],[-6,-3600],[-2,-3600],[-9,-3600],[-3,-3600],[4,-3600],[-3,-3600],[-4,-7200],[-8,-3600],[8,-3600],[4,-3600],[0,-3600],[19,-3600],[-4,-3600],[-7,-3600],[0,-3600],[8,-3600],[6,-3600],[7,-3600],[20,-3600],[-5,-3600],[-13,-3600],[8,-3600],[20,-3600],[7,-3600],[-11,-3600],[-19,-3600],[-3,-3600],[3,-3600],[5,-3600],[10,-3600],[4,-3600],[3,-3600],[0,-3600],[-2,-3600],[0,-3600],[-1,-3600],[-4,-3600],[3,-3600],[-8,-3600],[0,-3600],[3,-3600],[3,-3600],[-17,-3600],[3,-3600],[-5,-3600],[-4,-3600],[4,-3600],[0,-3600],[-17,-3600],[0,-10800],[-1,-3600],[19,-3600],[0,-3600],[-14,-3600],[-5,-3600],[-1,-3600],[0,-3600],[4,-3600],[-7,-3600],[-6,-3600],[20,-3600],[-1,-3600],[4,-3600],[-14,-3600],[-9,-3600],[-6,-3600],[9,-3600],[2,-3600],[11,-3600],[0,-3600],[4,-3600],[-12,-3600],[-7,-3600],[2,-3600],[1,-3600],[-1,-3600],[4,-3600],[3,-3600],[5,-3600],[-1,-3600],[7,-3600],[-2,-3600],[-3,-3600],[10,-3600],[-5,-3600],[17,-3600],[-4,-3600],[5,-3600],[6,-3600],[9,-3600],[-13,-3600],[11,-3600],[-10,-3600],[4,-3600],[-3,-3600],[-8,-3600],[-1,-3600],[-6,-3600],[-1,-3600],[2,-3600],[-7,-3600],[-1,-3600],[0,-7200],[1,-3600],[8,-3600],[-7,-3600],[-4,-3600],[1,-3600],[15,-3600],[-3,-3600],[18,-3600],[6,-3600],[-29,-3600],[3,-3600]]},"h":{"e":1,"s":"2020-06-02 10:00:00","d":3600,"m":10,"v":[501,[-40,-3600],[159,-3600],[149,-3600],[19,-3600],[-27,-3600],[-40,-3600],[-108,-3600],[-74,-7200],[-107,-3600],[-1,-3600],[-30,-3600],[-30,-3600],[20,-3600],[-40,-3600],[-29,-3600],[-12,-3600],[10,-3600],[2,-3600],[18,-3600],[62,-3600],[40,-3600],[-50,-3600],[38,-3600],[132,-3600],[176,-3600],[130,-3600],[72,-3600],[-13,-3600],[-19,-3600],[-5,-3600],[-41,-3600],[-121,-3600],[-82,-3600],[-16,-3600],[-1,-3600],[0,-3600],[8,-3600],[-21,-3600],[13,-3600],[-42,-3600],[-37,-3600],[-41,-3600],[87,-3600],[-19,-3600],[12,-3600],[61,-3600],[16,-3600],[53,-3600],[40,-3600],[-91,-3600],[-69,-10800],[-20,-3600],[185,-3600],[-25,-3600],[-114,-3600],[-38,-3600],[-8,-3600],[-12,-3600],[-10,-3600],[-99,-3600],[-69,-3600],[79,-3600],[9,-3600],[30,-3600],[-58,-3600],[-42,-3600],[-9,-3600],[-21,-3600],[40,-3600],[112,-3600],[88,-3600],[162,-3600],[60,-3600],[5,-3600],[12,-3600],[-46,-3600],[-71,-3600],[-53,-3600],[-40,-3600],[-8,-3600],[-62,-3600],[-9,-3600],[-48,-3600],[-40,-3600],[-22,-3600],[-10,-3600],[41,-3600],[-1,-3600],[21,-3600],[11,-3600],[107,-3600],[-76,-3600],[67,-3600],[-49,-3600],[99,-3600],[142,-3600],[16,-3600],[0,-3600],[-149,-3600],[-40,-3600],[-28,-3600],[-30,-3600],[-11,-3600],[-19,-7200],[-31,-3600],[2,-3600],[-72,-3600],[-60,-3600],[0,-3600],[50,-3600],[-10,-3600],[61,-3600],[80,-3600],[-189,-3600],[120,-3600]]},"no2":{"e":1,"s":"2020-06-02 08:00:00","d":3600,"m":10,"v":[224,[-13,-3600],[-51,-3600],[-123,-7200],[-5,-3600],[-4,-3600],[-9,-3600],[0,-3600],[9,-3600],[4,-3600],[10,-3600],[0,-3600],[-14,-3600],[0,-3600],[4,-3600],[19,-3600],[-9,-3600],[-14,-3600],[14,-3600],[27,-3600],[9,-3600],[23,-3600],[-27,-3600],[82,-3600],[-14,-3600],[-18,-3600],[-41,-3600],[-69,-7200],[-4,-3600],[0,-3600],[4,-3600],[5,-3600],[4,-3600],[14,-3600],[5,-3600],[-14,-3600],[-5,-3600],[0,-3600],[-4,-7200],[0,-3600],[0,-3600],[4,-3600],[0,-3600],[-4,-3600],[0,-3600],[-5,-7200],[0,-3600],[0,-3600],[5,-3600],[4,-7200],[-9,-3600],[9,-3600],[32,-3600],[-18,-3600],[0,-3600],[-14,-3600],[5,-3600],[-14,-3600],[0,-3600],[5,-3600],[0,-3600],[0,-3600],[4,-3600],[0,-3600],[9,-3600],[28,-3600],[23,-3600],[0,-3600],[-19,-3600],[-18,-3600],[-4,-3600],[13,-3600],[9,-3600],[14,-7200],[-4,-3600],[13,-3600],[-23,-3600],[-18,-3600],[-4,-3600],[0,-3600],[0,-3600],[22,-3600],[-18,-3600],[18,-3600],[-22,-3600],[9,-3600],[-5,-3600],[9,-3600],[9,-3600],[5,-3600],[-14,-3600],[-27,-3600],[-5,-3600],[-4,-3600],[0,-3600],[0,-3600],[-5,-3600],[9,-7200],[14,-3600],[23,-3600],[-18,-7200],[0,-3600],[0,-3600],[4,-3600],[14,-3600],[4,-3600],[-18,-3600],[23,-3600],[5,-3600],[41,-3600],[9,-3600],[59,-3600],[-36,-3600],[-19,-3600],[23,-3600],[-77,-3600],[-42,-3600],[-13,-3600],[4,-3600],[9,-3600],[5,-7200],[50,-3600],[-18,-3600],[-32,-3600],[-9,-3600],[4,-3600],[0,-3600],[0,-3600],[-4,-3600],[9,-3600],[5,-3600],[13,-3600],[5,-3600],[-23,-3600],[23,-3600]]},"p":{"e":1,"s":"2020-06-02 10:00:00","d":3600,"m":10,"v":[9757,[1,-3600],[2,-3600],[8,-3600],[3,-3600],[4,-3600],[1,-3600],[5,-3600],[10,-7200],[2,-3600],[-1,-3600],[-4,-3600],[-7,-3600],[-1,-3600],[0,-3600],[-1,-3600],[-1,-3600],[4,-3600],[-2,-3600],[2,-3600],[3,-3600],[2,-3600],[1,-3600],[0,-3600],[1,-3600],[3,-3600],[-3,-3600],[-1,-3600],[-2,-3600],[-1,-3600],[2,-3600],[-3,-3600],[-4,-3600],[-3,-3600],[-4,-3600],[-4,-3600],[-4,-3600],[-3,-3600],[-3,-3600],[-4,-3600],[-3,-3600],[-6,-3600],[-7,-3600],[-1,-3600],[1,-3600],[-2,-3600],[1,-3600],[2,-3600],[0,-3600],[2,-3600],[4,-3600],[10,-10800],[5,-3600],[8,-3600],[7,-3600],[6,-3600],[2,-3600],[3,-3600],[-2,-3600],[-1,-3600],[-5,-3600],[-5,-3600],[4,-3600],[1,-3600],[2,-3600],[2,-3600],[1,-3600],[3,-3600],[0,-3600],[3,-3600],[4,-3600],[4,-3600],[3,-3600],[5,-3600],[1,-3600],[4,-3600],[3,-3600],[4,-3600],[1,-3600],[3,-3600],[2,-3600],[3,-3600],[2,-3600],[-4,-3600],[-3,-3600],[-3,-3600],[1,-3600],[4,-3600],[4,-3600],[5,-3600],[5,-3600],[4,-3600],[0,-3600],[-2,-3600],[1,-3600],[1,-3600],[-2,-3600],[-1,-3600],[-2,-3600],[0,-3600],[2,-3600],[2,-3600],[3,-3600],[0,-3600],[2,-7200],[-5,-3600],[-8,-3600],[-3,-3600],[-3,-3600],[2,-3600],[2,-3600],[2,-3600],[3,-3600],[4,-3600],[0,-3600],[6,-3600]]},"pm10":{"e":1,"s":"2020-06-02 08:00:00","d":3600,"m":1,"v":[35,[-5,-3600],[-10,-3600],[-8,-3600],[-2,-3600],[1,-3600],[-3,-3600],[2,-3600],[1,-3600],[2,-3600],[4,-3600],[0,-3600],[-3,-3600],[1,-3600],[3,-3600],[1,-3600],[-4,-3600],[2,-3600],[0,-3600],[2,-3600],[-4,-3600],[0,-3600],[5,-3600],[3,-3600],[1,-3600],[-5,-3600],[-7,-3600],[-2,-3600],[0,-3600],[0,-3600],[-2,-3600],[-2,-3600],[-1,-3600],[-2,-3600],[2,-3600],[-1,-3600],[0,-3600],[1,-3600],[0,-3600],[-1,-3600],[1,-3600],[-2,-3600],[-1,-3600],[1,-3600],[3,-3600],[-2,-3600],[-1,-3600],[-2,-3600],[3,-7200],[1,-3600],[2,-3600],[2,-3600],[-1,-3600],[-2,-3600],[1,-3600],[0,-3600],[3,-3600],[-4,-3600],[-1,-3600],[3,-3600],[0,-3600],[2,-3600],[3,-3600],[-3,-3600],[0,-3600],[-1,-3600],[-1,-3600],[2,-3600],[1,-3600],[1,-3600],[5,-3600],[-4,-3600],[-1,-3600],[-2,-3600],[1,-3600],[0,-3600],[-1,-3600],[0,-3600],[3,-3600],[3,-3600],[-2,-3600],[-1,-3600],[0,-3600],[0,-3600],[-1,-3600],[-2,-3600],[1,-3600],[2,-3600],[-1,-3600],[-2,-3600],[-2,-3600],[4,-3600],[3,-3600],[-2,-3600],[2,-3600],[-2,-3600],[-2,-3600],[-1,-3600],[1,-3600],[0,-3600],[-1,-3600],[-1,-3600],[-2,-3600],[1,-3600],[-1,-3600],[2,-3600],[6,-3600],[3,-3600],[-4,-3600],[-3,-3600],[2,-3600],[2,-3600],[-1,-3600],[2,-3600],[-1,-3600],[1,-3600],[3,-3600],[6,-3600],[2,-3600],[-7,-3600],[0,-3600],[-5,-3600],[-4,-3600],[0,-3600],[-1,-3600],[-2,-3600],[0,-3600],[-1,-3600],[3,-3600],[5,-3600],[-3,-3600],[-1,-3600],[-1,-3600],[1,-3600],[1,-3600],[-2,-3600],[-1,-3600],[2,-3600],[-1,-3600],[0,-3600],[1,-3600],[2,-3600],[2,-3600]]},"pm25":{"e":1,"s":"2020-06-02 08:00:00","d":3600,"m":1,"v":[55,[-9,-3600],[-4,-3600],[-12,-3600],[-13,-3600],[8,-3600],[-4,-3600],[-4,-3600],[4,-3600],[0,-3600],[25,-3600],[-8,-3600],[-8,-3600],[8,-3600],[4,-3600],[4,-3600],[0,-3600],[-4,-7200],[0,-3600],[0,-3600],[-12,-3600],[12,-3600],[0,-3600],[-4,-3600],[0,-3600],[-17,-3600],[0,-3600],[9,-3600],[-9,-3600],[-8,-3600],[8,-3600],[-8,-3600],[4,-3600],[0,-3600],[-8,-3600],[8,-3600],[0,-3600],[-4,-3600],[-4,-3600],[8,-3600],[-8,-3600],[0,-3600],[0,-3600],[8,-3600],[-12,-7200],[0,-3600],[0,-3600],[8,-3600],[0,-3600],[4,-3600],[0,-3600],[4,-3600],[0,-3600],[0,-3600],[-8,-3600],[0,-3600],[8,-3600],[-8,-3600],[4,-3600],[4,-3600],[4,-3600],[0,-3600],[0,-3600],[-12,-3600],[4,-7200],[0,-3600],[0,-3600],[13,-3600],[20,-3600],[-20,-3600],[0,-3600],[0,-3600],[8,-3600],[-4,-3600],[4,-3600],[-8,-3600],[4,-3600],[8,-3600],[-12,-3600],[0,-3600],[4,-3600],[-4,-3600],[0,-3600],[-5,-3600],[5,-3600],[4,-3600],[12,-3600],[-12,-3600],[-13,-3600],[4,-3600],[17,-3600],[-12,-3600],[4,-3600],[4,-3600],[-4,-3600],[-4,-3600],[8,-3600],[0,-3600],[-4,-3600],[0,-3600],[-17,-3600],[4,-3600],[9,-3600],[8,-3600],[0,-3600],[4,-3600],[0,-3600],[4,-3600],[-4,-3600],[4,-3600],[-4,-3600],[11,-3600],[-11,-3600],[8,-3600],[0,-3600],[3,-3600],[6,-3600],[-13,-3600],[-8,-3600],[4,-3600],[-8,-3600],[-4,-3600],[-9,-3600],[0,-3600],[9,-3600],[-9,-3600],[13,-3600],[0,-3600],[0,-3600],[12,-3600],[-8,-3600],[0,-3600],[0,-3600],[-4,-3600],[-13,-3600],[4,-3600],[0,-3600],[-4,-3600],[9,-3600],[0,-3600],[8,-3600]]},"r":{"e":1,"s":"2020-05-31 14:00:00","d":3600,"m":10,"v":[990,[4,-21600],[4,-43200],[-5,-86400],[0,-21600],[-991,-64800],[0,-21600],[988,-21600],[0,-21600],[2,-108000]]},"so2":{"e":1,"s":"2020-06-02 08:00:00","d":3600,"m":10,"v":[56,[-5,-3600],[0,-3600],[-5,-3600],[0,-3600],[0,-3600],[-5,-7200],[5,-3600],[5,-3600],[5,-3600],[5,-3600],[-10,-3600],[-5,-3600],[-5,-3600],[5,-3600],[0,-3600],[-5,-3600],[0,-3600],[5,-3600],[-5,-3600],[-5,-3600],[0,-3600],[10,-3600],[5,-3600],[-5,-10800],[0,-3600],[0,-3600],[-5,-3600],[10,-10800

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

有反爬机制,ip被ban掉了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...