ming 3 år sedan
förälder
incheckning
64e4eeda69
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      similar_web/main.py

+ 2 - 2
similar_web/main.py

@@ -70,13 +70,13 @@ async def get_domain_data(raw_domain):
     if jsdict==None:
         headers = {"x-rapidapi-key": "6dd30886e0msh7aefc9a0a794398p1896f2jsn275c45475609",
             "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)
         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"
         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)
         jsdict['totalVisits'] = js2['engagement']['totalVisits']
         jsdict['EstimatedMonthlyVisits']=js2['monthlyVisitsEstimate']