From f85c8bd7211402c3625d05642c4d3dbcf555dd9d Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Fri, 30 Apr 2021 01:22:27 +0530 Subject: [PATCH] Update deep_info1.py Removed Depreciated argument --- risks_and_deep_search/deep_info1.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/risks_and_deep_search/deep_info1.py b/risks_and_deep_search/deep_info1.py index 1d6302f..fe30592 100644 --- a/risks_and_deep_search/deep_info1.py +++ b/risks_and_deep_search/deep_info1.py @@ -14,6 +14,7 @@ from clint.textui import colored import optparse from clint.textui import colored +import undetected_chromedriver as uc def deep_one(phone_number): options = webdriver.ChromeOptions() @@ -21,10 +22,10 @@ def deep_one(phone_number): options.add_argument('--no-sandbox') options.add_argument('disable-infobars') options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'}) - options.add_argument("user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36") - loc=os.getcwd() - serv=Service("%s/path/chromedriver"%loc) - driver = webdriver.Chrome(options=options,service=serv) + options.add_argument( + "user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36") + loc = os.getcwd() + driver = uc.Chrome(options=options) driver.get("https://www.duckduckgo.com/") WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div[2]/div/div[1]/div[2]/form/input[1]"))).send_keys(phone_number) WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '/html/body/div/div[2]/div/div[1]/div[2]/form/input[2]'))).click() @@ -32,7 +33,7 @@ def deep_one(phone_number): for x in range(0,30): xpath='//*[@id="r1-%s"]/div/div[1]/div/a'%x name=WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, xpath))).text - print(colored.green("[+]This Link Could Be Relevant With Your Number:"),end="") + print(colored.green("[+]This Link Could Be Relevant With Your Number:"), end="") print(colored.blue(name)) except: pass