|  | @@ -58,10 +58,23 @@ async def get_domain(domain_name):
 | 
											
												
													
														|  |      js=json.loads(response.text)
 |  |      js=json.loads(response.text)
 | 
											
												
													
														|  |      print(response.text)
 |  |      print(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)
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    js2=json.loads(response.text)
 | 
											
												
													
														|  | 
 |  | +    print(response.text)
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    jsdict['monthlyVisitsEstimate']=js2['monthlyVisitsEstimate']
 | 
											
												
													
														|  |  #    desc=js['siteDescription']
 |  |  #    desc=js['siteDescription']
 | 
											
												
													
														|  |  #    ustr=desc.encode('utf-8').decode('utf-8')
 |  |  #    ustr=desc.encode('utf-8').decode('utf-8')
 | 
											
												
													
														|  |  #    print(ustr)
 |  |  #    print(ustr)
 | 
											
												
													
														|  | -    jsdict={'SiteName':js['name'],'Description':js['siteDescription'],'GlobalRank':js['globalRank'],'Title':js['name'],'Category':js['categoryRank']['taxonomy'],'CountryRank':js['countryRank']['rank']}
 |  | 
 | 
											
												
													
														|  |      return JSONResponse(content=jsdict)
 |  |      return JSONResponse(content=jsdict)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 |