|
@@ -13,7 +13,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
from pydantic import BaseModel
|
|
from pydantic import BaseModel
|
|
from googlesearch import search
|
|
from googlesearch import search
|
|
import asyncio
|
|
import asyncio
|
|
-
|
|
|
|
|
|
+import time
|
|
fake_rank_plus = 700
|
|
fake_rank_plus = 700
|
|
fake_traffic_weighted = 1.3
|
|
fake_traffic_weighted = 1.3
|
|
|
|
|
|
@@ -132,6 +132,7 @@ async def get_domain_by_keyword(req:kw_req):
|
|
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}
|
|
|
|
+ time.sleep(5)
|
|
try:
|
|
try:
|
|
response = requests.request("GET", url, headers=headers, params=querystring)
|
|
response = requests.request("GET", url, headers=headers, params=querystring)
|
|
js2=json.loads(response.text)
|
|
js2=json.loads(response.text)
|