add kw endpoint
parent
65eae04ac0
commit
5c269008dd
16
scrapper.py
16
scrapper.py
|
@ -1,5 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
|
import requests
|
||||||
|
import sys
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.webdriver.chrome.options import Options
|
from selenium.webdriver.chrome.options import Options
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
|
@ -40,8 +42,18 @@ config = {
|
||||||
with open(config[ACTIVE_ENV]["marketplace_path"], "r", encoding="utf-8") as f:
|
with open(config[ACTIVE_ENV]["marketplace_path"], "r", encoding="utf-8") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
with open(config[ACTIVE_ENV]["keyword_path"], "r", encoding="utf-8") as f:
|
# with open(config[ACTIVE_ENV]["keyword_path"], "r", encoding="utf-8") as f:
|
||||||
keywords = json.load(f)
|
# keywords = json.load(f)
|
||||||
|
keywords = []
|
||||||
|
url = "https://cosmos.utopiadeals.com/cosmos/rest/get-keywords-on-automation"
|
||||||
|
response = requests.get(url)
|
||||||
|
if response.status_code == 200:
|
||||||
|
keywords = response.json()
|
||||||
|
print(keywords)
|
||||||
|
else:
|
||||||
|
print("Error:", response.status_code)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
with open(config[ACTIVE_ENV]["cookies_path"], "r", encoding="utf-8") as f:
|
with open(config[ACTIVE_ENV]["cookies_path"], "r", encoding="utf-8") as f:
|
||||||
cookies_ref = json.load(f)
|
cookies_ref = json.load(f)
|
||||||
|
|
Loading…
Reference in New Issue