文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 20d84e4c by 李景熙

dataset结构变更以及添加变更状态函数、删除函数;

同时添加爬虫平台数据源
parent 67a1aa8f
from pymongo import MongoClient
host = '39.105.93.102' # 服务器url
client = MongoClient(host, 27017) # 服务器端口
db = client['python-db']
traffic = db.Traffic
weather = db.Weather
airports = db.airports
# 查询traffic表中的所有数据并打印
def get_item():
try:
result = traffic.find({})
for i in result:
print(i)
except Exception as e:
print(e)
if __name__ == '__main__':
get_item()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment