|
@@ -70,13 +70,13 @@ async def get_domain_data(raw_domain):
|
|
if jsdict==None:
|
|
if jsdict==None:
|
|
headers = {"x-rapidapi-key": "6dd30886e0msh7aefc9a0a794398p1896f2jsn275c45475609",
|
|
headers = {"x-rapidapi-key": "6dd30886e0msh7aefc9a0a794398p1896f2jsn275c45475609",
|
|
"x-rapidapi-host": "similarweb2.p.rapidapi.com"}
|
|
"x-rapidapi-host": "similarweb2.p.rapidapi.com"}
|
|
- response = requests.request("GET", url, headers=headers, params=querystring)
|
|
|
|
|
|
+ await response = requests.request("GET", url, headers=headers, params=querystring)
|
|
js=json.loads(response.text)
|
|
js=json.loads(response.text)
|
|
jsdict={'SiteName':js['name'],'Description':js['siteDescription'],'GlobalRank':js['globalRank'],'Title':js['name'],'Category':js['categoryRank']['taxonomy'],'CountryRank':js['countryRank']['rank']}
|
|
jsdict={'SiteName':js['name'],'Description':js['siteDescription'],'GlobalRank':js['globalRank'],'Title':js['name'],'Category':js['categoryRank']['taxonomy'],'CountryRank':js['countryRank']['rank']}
|
|
url = "https://similarweb2.p.rapidapi.com/trafficoverview"
|
|
url = "https://similarweb2.p.rapidapi.com/trafficoverview"
|
|
querystring = {"website":domain_name}
|
|
querystring = {"website":domain_name}
|
|
|
|
|
|
- response = requests.request("GET", url, headers=headers, params=querystring)
|
|
|
|
|
|
+ await response = requests.request("GET", url, headers=headers, params=querystring)
|
|
js2=json.loads(response.text)
|
|
js2=json.loads(response.text)
|
|
jsdict['totalVisits'] = js2['engagement']['totalVisits']
|
|
jsdict['totalVisits'] = js2['engagement']['totalVisits']
|
|
jsdict['EstimatedMonthlyVisits']=js2['monthlyVisitsEstimate']
|
|
jsdict['EstimatedMonthlyVisits']=js2['monthlyVisitsEstimate']
|