【发布时间】:2018-06-23 11:49:00
【问题描述】:
我目前正在做一个从foursquare 中删除数据的系统。现在我已经使用 python 和美丽的汤从网站上删除了评论,并有一个如下所示的 json 文件
{"review": "From sunset too variety food u cant liked it.."}{"review": "Byk motor laju2"}{"review": "Good place to chill"}{"review": "If you wan to play bubble and take photo, here is the best place"}{"review": "Scenic view for weekend getaway... coconut shake not taste as original klebang coconut shake..."}{"review": "Getting dirtier"}{"review": "Weekend getaway!"}{"review": "Good for casual walk & watching sunset with loved ones since my last visit macam2 ade kat sini very packed during public holidays"}{"review": "Afternoon time quite dry..beach is normal. Maybe evening/night might be better. The coconut shake they add vanilla ice cream,hmmm"}{"review": "Pantai awesome beb"}{"review": "Nice place for picnic"}{"review": "Cannot mandi here. Good place for recreation.. Calm place for weekdays! Haha"}{"review": "Very bz place. Need to go there early if you want to lepak. If not, no parking for you"}{"review": "So many good attraction here, worth a visit"}{"review": "Beautiful place for sunset"}{"review": "New beach! Like all beaches, awesome view & windy. Some stretch got many small crabs."}{"review": "There is bustel \"hotel in a bus\" can get coconut shake or fried seafood in the evening at 5pm. Bustel rate is from RM80. Bus cafe, bus toilet... Total bus transformation"}{"review": "Too crowded la"}{"review": "Muzium kapal selam closed since 1/3 until further notice..\ud83d\ude29"}{"review": "If you are looking for public toilets, look for a red bus. An old bus was modified and transformed to operate as toilets. Cool."}{"review": "Most of the shops closed after 12 midnight..helloo,this place should be the place for the late nighters..late night supposed to be the peak hour for business..live band bar maybe?? :-P"}
我的问题是如何立即将数据插入数据库?可以使用 MYSQL,还是应该使用 PyMongo。
【问题讨论】:
-
您可以为此使用 any 数据库。您选择哪一个取决于您已经熟悉的系统、项目已经使用的系统(如果有的话)、项目可能还有哪些其他要求等...
-
Pymongo 是一个 Python 包,这意味着您将使用 MongoDB 作为数据库。
标签: python mysql json django pymongo