|
@@ -44,9 +44,11 @@ async def read_item(domain_name):
|
|
|
jsdata=conn.root.get_url('https://data.similarweb.com/api/v1/data?domain='+domain_name)
|
|
|
print(jsdata)
|
|
|
# jsdict=str(jsdata)[1:-1]
|
|
|
- jsdict=str(jsdata)
|
|
|
+ jsdict=json.loads(jsdata)
|
|
|
+# jsdict=str(jsdata)
|
|
|
table=db['similar']
|
|
|
- table.insert({'domain_name':domain_name,'json':jsdict,'dt':datetime.datetime.now()})
|
|
|
+ jstr=json.dumps(jsdict)
|
|
|
+ table.insert({'domain_name':domain_name,'json':jstr,'dt':datetime.datetime.now()})
|
|
|
db.commit()
|
|
|
return jsdata
|
|
|
# print(jsdata)
|