added Hasaki crawler
This commit is contained in:
parent
3d87935aa2
commit
f46771b287
|
@ -2,6 +2,7 @@ import logging
|
|||
from fake_useragent import UserAgent
|
||||
import brotli
|
||||
import seleniumwire.undetected_chromedriver as uc
|
||||
from selenium_stealth import stealth
|
||||
import json
|
||||
import time
|
||||
|
||||
|
@ -12,6 +13,7 @@ def get_raw_product_data_selenium(url):
|
|||
|
||||
op = uc.ChromeOptions()
|
||||
op.add_argument(f"user-agent={random_mobile_ua}")
|
||||
op.add_argument('--blink-settings=imagesEnabled=false')
|
||||
#op.add_experimental_option("useAutomationExtension", False)
|
||||
#op.add_argument('--no-sandbox')
|
||||
#op.add_argument('--disable-notifications')
|
||||
|
@ -19,6 +21,13 @@ def get_raw_product_data_selenium(url):
|
|||
op.headless = False
|
||||
|
||||
driver = uc.Chrome(version_main=122, options=op)
|
||||
stealth(driver,
|
||||
languages=["en-US", "en"],
|
||||
vendor="Google Inc.",
|
||||
webgl_vendor="Intel Inc.",
|
||||
renderer="Intel Iris OpenGL Engine",
|
||||
fix_hairline=True,
|
||||
)
|
||||
|
||||
driver.get(url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue