ark930 / shanghai-bus Goto Github PK
View Code? Open in Web Editor NEW上海公交信息实时查询接口
上海公交信息实时查询接口
很抱歉,由于您访问的URL有可能对网站造成安全威胁,您的访问被阻断。
这种是要怎么解决的?
抓取页面结构可能有所变化,代码已不可用
Ubuntu环境下出现500错误,访问网址 127.0.0.1:5000/bus/960路
log:
* Serving Flask app "router"
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2019-05-08 11:18:40,751] ERROR in app: Exception on /bus/960路 [GET]
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python3/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/lib/python3/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python3/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/asus/Desktop/shanghai-bus-master/router.py", line 32, in query_router
routers = bus.query_router(router_name, direction)
File "/home/asus/Desktop/shanghai-bus-master/bus.py", line 132, in query_router
soup = BeautifulSoup(r.text.encode(r.encoding), 'lxml')
File "/home/asus/.local/lib/python3.6/site-packages/bs4/__init__.py", line 196, in __init__
% ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
是编码的问题?还是使用方式不对?
另外windows下出现的是404错误,由于我的windows系统语言是英文的,可能处理路线的时候有问题(尽管我加上了# -- coding: utf-8 --),您知道有什么方法能够解决这个问题吗?
谢谢
我试过直接在浏览器访问http://127.0.0.1:5000/bus/960%E8%B7%AF?direction=1,也尝试过以下命令:
curl -v -L -G -d "direction=1" http://127.0.0.1:5000/bus/960%E8%B7%AF
curl -G -i "http://127.0.0.1:5000/bus/960%E8%B7%AF" --data-urlencode 'direction=1'
curl -g -i 'http://127.0.0.1:5000/bus/960%E8%B7%AF?direction=1'
都是500错误。所以不太明白应该怎么操作,抱歉我实在是小白。。
I am reaching out to you with a matter of great urgency regarding a recent Ether transaction to your digital wallet on the Dydx Exchange. Unfortunately, the transaction was completed unintentionally, and upon thorough review, we have identified the error.
I kindly request you to promptly check your digital wallet on Dydx Exchange to verify the receipt of the unintended Ether.
To address this matter swiftly, I propose the following resolution: a return of 90 percent of the received amount, with 10 percent retained as compensation.
Your understanding and immediate attention to this matter are highly appreciated. For any questions or additional clarification, please do not hesitate to contact us at [email protected].
Best regards,
John Glenn
作者你好:
首先,感谢您在github上的发布,我有幸看到了这个shanghai-bus的程序,于是自己简单发布用来做小程序的后台来测试,感觉这是个非常不错的程序。
昨天,不知是上海发布的接口进行了调整还是加强了校验,该程序不能够正常的访问了。
如果你有时间,希望您能帮忙看一下是否可以有解决方法,非常感谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.