5 best Binary Options trading strategies [ Beginners 2022 ]

Binary Options

Binary options subreddit to share strategies and discuss anything related to the BO industry: regulation, scams, strategies, greeks, news, lucky trades, etc.
[link]

Binary Options Trading

Learn to **trade binary options** online. Binary options are based on a simple yes or no proposition – you need to decide if asset will go above a certain price at a certain time. We suggest trying out [Binary School](http://gobinary24.com/mobile-app) – a mobile app for learning and trade simulation.
[link]

BinaryOptions Trading

Advice for binary option trading
[link]

I simply can't use webdriver manager in ANY browser, EVERY one ends up in some error

I'm trying the following code:
from selenium import webdriver
from webdriver_manager.opera import OperaDriverManager
options = webdriver.ChromeOptions()
options.add_argument('allow-elevated-browser')
options.binary_location = "C:\\Users\\Use\\AppData\\Local\\Programs\\Opera GX\\Opera\\91.0.4516.106\\opera.exe"
driver = webdriver.Opera(executable_path=OperaDriverManager().install(), options=options)
and the error is
WebDriverException: Message: unknown error: no opera binary at C:\Users\Use\AppData\Local\Programs\Opera GX\Opera\91.0.4516.106\opera.exe (Driver info: operadriver=106.0.5249.119 (9f2101830b56fd2ea1408287f6c74e253ebcb7c6-refs/branch-heads/5249@{#797}),platform=Windows NT 10.0.17134 x86_64)

can someone help me? A similar error appears to EVERY other borwser I have
submitted by duosula to learnpython [link] [comments]

selenium how to toggle button.

I am doing my first steps on web scrapping. a few days ago i posted here about scrapping a table which was not really a table from adidas website in order to get shoe sizes sizes. Using requests the table is not rendered so it was suggested to use selenium.. the url is this: https://www.adidas.com/us/help/size_charts
if you inspect the site. the table with the different sizes is just made of imbricated div tags.
obviously i could not use pandas read_html as no table tag can be found.
after much research, try and error i almost got it. i managed to extract the header and the EU size from the chart.
however i am faced with a challenge. in selenium i need to toggle the inches to cm. as by default the webpage is rendered in inches..
here is my code which output in a dataframe the inches and the EU sizes equivalent. but I want to use cm in the the heel-toe measurement column.
from selenium import webdriver from selenium.webdriver.chrome.options import Options from bs4 import BeautifulSoup import pandas as pd brave = 'C:\Program Files\BraveSoftware\Brave-Browser\Application\\brave.exe' option = Options() option.binary_location = brave browser = webdriver.Chrome(options=option) browser.get("https://www.adidas.com/us/help/size_charts") soup = BeautifulSoup(browser.page_source, 'lxml') header = soup.find_all("div",{"class":"gl-table__row gl-table__row--head"}) body = soup.find_all("div",{"class":"gl-table__row gl-table__row--body"}) heel_toe = [] for head in header[0]: heel_toe.append(head.text) EU_size = [] for sz_type in body: sz_type.find_all("div",{"class": "gl-table__cell-inner"}) if 'EU' in sz_type.text: for sz in sz_type: EU_size.append(sz.text) adidas = {} adidas[heel_toe[0]] = heel_toe[1:] adidas[EU[0]] = EU[1:] df = pd.DataFrame(adidas) print(df) 
my idea is to do something similar to other brands like puma and new balance and have a chart comparing the sizes across all the brands.
TIA
submitted by dan7843292 to learnpython [link] [comments]

Must I use headless browser for a scrapy spider deployed to Heroku?

I am writing to scrape a Java-script website. Hence the HTML code differs when I use headless vs opening the browser.

I can scrape the site perfectly well when my code opens the browser, but not when I use headless. However when I comment off headless when I deploy the spider on Heroku, the browser crashed.

chrome_options = webdriver.ChromeOptions()
chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN")
#chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument("--no-sandbox")
driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options)
submitted by JaneTan123 to scrapy [link] [comments]

Why is my Selenium webdriver crashing on heroku?

I need to run a full chrome browser on heroku in order to scrape data. This browser cannot be headless or it does not get the data I desire. Why does it crash with the following error when I try to initialize the driver?
Error: DevToolsActivePort file doesn't exist
here is the driver code. it crashed when I use it.
def getDriver(): try: chrome_options = webdriver.ChromeOptions() chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") # chrome_options.add_argument("--headless") chrome_options.add_argument("start-maximized") chrome_options.add_argument("--window-size=1920,1080") chrome_options.add_argument("--disable-dev-shm-usage") chrome_options.add_argument("--no-sandbox") chrome_options.add_argument('--user-agent="Mozilla/5.0 (Windows Phone 10.0 Android 4.2.1 Microsoft Lumia 640 XL LTE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10166"') chrome_options.add_argument("--disable-dev-shm-usage") driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options) return driver except Exception: traceback.print_exc() print(Exception) # return getDriver() 
Does any one know why is is throwing that error and crashing. It works fine on my computer but crashes on Heroku.
submitted by PriceStalker to CodingHelp [link] [comments]

Why is my Selenium webdriver crashing on heroku?

I need to run a full chrome browser on heroku in order to scrape data. This browser cannot be headless or it does not get the data I desire. Why does it crash with the following error when I try to initialize the driver?
Error: DevToolsActivePort file doesn't exist
here is the driver code. it crashed when I use it.
def getDriver(): try: chrome_options = webdriver.ChromeOptions() chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") # chrome_options.add_argument("--headless") chrome_options.add_argument("start-maximized") chrome_options.add_argument("--window-size=1920,1080") chrome_options.add_argument("--disable-dev-shm-usage") chrome_options.add_argument("--no-sandbox") chrome_options.add_argument('--user-agent="Mozilla/5.0 (Windows Phone 10.0 Android 4.2.1 Microsoft Lumia 640 XL LTE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10166"') chrome_options.add_argument("--disable-dev-shm-usage") driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options) return driver except Exception: traceback.print_exc() print(Exception) # return getDriver() 
Does any one know why is is throwing that error and crashing. It works fine on my computer but crashes on Heroku.
submitted by PriceStalker to AskProgramming [link] [comments]

Scraping specific data failing on XPath

Hi Guys,
I'm trying to test out how to scrape Google for information using Selenium & Python, specifically the people also ask questions and answers, I nearly have my code down but the Xpath seems to be an issue.
Code:
#!/usbin/env python import pathlib import requests import time import urllib.parse from datetime import datetime from selenium import webdriver from selenium.webdriver import Keys from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC def extract_question_and_answers(): # init the chrome driver. def init_driver(using_linux, proxy): script_directory = pathlib.Path().absolute() try: options = Options() options.headless = False options.add_argument('start-maximized') options.add_argument('--disable-popup-blocking') options.add_argument('--disable-notifications') options.add_argument('--log-level=3') options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-ssl-errors') options.add_argument(f"user-data-dir={script_directory}\\profile") options.add_experimental_option("excludeSwitches", ["enable-automation"]) options.binary_location = r"C:\Program Files\Google\Chrome Beta\Application\chrome.exe" prefs = {'profile.default_content_setting_values.notifications': 2} options.add_experimental_option('prefs', prefs) if proxy == "0.0.0.0:00": print(" PROXY DISABLED ...") else: print(" PROXY: " + str(proxy) + " ...") options.add_argument('--proxy-server=%s' % proxy) if using_linux: return webdriver.Chrome(options=options) else: return webdriver.Chrome(options=options) except Exception as e: print(e) # click on the question (get the question text) & also get the answer in a loop? def question_and_answer_extraction(_driver): # does not work is only an example! # paa = driver.find_element(By.XPATH, "//span/following-sibling::div[contains(@class,'cbphWd')]") # print([my_elem.get_attribute("data-q") for my_elem in WebDriverWait(driver, 20).until( # EC.visibility_of_all_elements_located( # (By.XPATH, "//span[text()='People also ask']//following::div[@data-q]")))]) all_questions = driver.find_elements(By.XPATH, "//span[text()='People also ask']//following::div[@data-q]") # how many questions & answers are there? print(len(all_questions)) j = 1 for question in all_questions: time.sleep(1) element = driver.find_element(By.XPATH, "//span[text()='People also ask']//following-sibling::div/descendant::div[@data-hveid and @class and @jsname and @data-q])[{j}]") j = j + 2 element.click() time.sleep(1) answer = element.find_element(By.XPATH, ".//../following-sibling::div").get_attribute('innerText') print('--------------') print(answer) print('--------------') # create driver session. driver = init_driver(False, "0.0.0.0:00") # starting URL. driver.get("https://www.google.com/") # type the initial query into Google (random keywords will be used in future) driver.find_element(By.XPATH, "//input[@aria-label='Search']").send_keys("dogs" + Keys.RETURN) # a small sleep is needed so the page loads. time.sleep(5) # captcha problems? if "Our systems have detected" in driver.page_source: print(" RECAPTCHA detected ...") time.sleep(30) # are there any questions to extract? if "People also ask" in driver.page_source: print(" SUCCESS!") print(" Extracting questions & answers to .txt file ..."); question_and_answer_extraction(driver) else: print("It seems there are no people also ask questions & answers!") if __name__ == "__main__": extract_question_and_answers() 
The classes seem to be dynamic so I can not hard code them in, I can get the question count absolutely fine but the code after fails on the Xpath, can anyone see the best way to get the specific data?
Cheers for any help guys!
submitted by Whobbeful88 to learnpython [link] [comments]

Getting error after updating chrome driver

getting this:
selenium.common.exceptions.WebDriverException: Message: unknown error: unexpected command response
from this:
driver.get(event.get_attribute('href'))

edit - figured it out myself
  1. go here https://chromedriver.chromium.org/downloads
  2. under version 104 they say the issue was resolved, so download 104
  3. download chrome beta, install normally, https://www.google.com/chrome/beta/
  4. slap this at the top of your program: chrome_options.binary_location = "C:/Program Files/Google/Chrome Beta/Application/chrome.exe"
submitted by Nelly01 to selenium [link] [comments]

ERROR - Using Selenium in a JS continuously loading webpage via python web crawling task from an ec2 aws ubuntu 20.04 LTS instance

## GOAL

- Use Selenium in a JS continuously loading webpage via python web crawling task from an ec2 aws ubuntu 20.04 LTS instance


## MAIN CODE PART


CHROME_PATH = '/usbin/chromium-browser' CHROMEDRIVER_PATH = '/usbin/chromedriver' WINDOW_SIZE = '1200, 800' chrome_options = Options() chrome_options.add_argument('headless') # chrome runs without a GUI window - as server doesn't have a gui chrome_options.add_argument('window-size=%s' % WINDOW_SIZE) #chrome_options.add_argument('ignore-ssl-errors') chrome_options.add_argument('hide-scrollbars') chrome_options.binary_location = CHROME_PATH options = webdriver.ChromeOptions() options.add_argument('--headless') driver = webdriver.Chrome(executable_path=CHROME_PATH, options=chrome_options) 


## A.) That I have tried to use afterwards


driver = webdriver.Chrome( executable_path=CHROMEDRIVER_PATH, chrome_options=chrome_options, ) 



Warning message generated that is on for 1 min

:1: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome( 


Than after 1 min error message
:1: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome( --------------------------------------------------------------------------- WebDriverException Traceback (most recent call last)  in  -- 1 driver = webdriver.Chrome( 2 executable_path=CHROMEDRIVER_PATH, 3 chrome_options=chrome_options, 4 ) 5 /uslocal/lib/python3.8/dist-packages/selenium/webdrivechrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive) 74 75 try: - 76 RemoteWebDriver.__init__( 77 self, 78 command_executor=ChromeRemoteConnection( /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options) 155 warnings.warn("Please use FirefoxOptions to set browser profile", 156 DeprecationWarning, stacklevel=2) 157 self.start_session(capabilities, browser_profile) 158 self._switch_to = SwitchTo(self) 159 self._mobile = Mobile(self) /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/webdriver.py in start_session(self, capabilities, browser_profile) 250 parameters = {"capabilities": w3c_caps, 251 "desiredCapabilities": capabilities} 252 response = self.execute(Command.NEW_SESSION, parameters) 253 if 'sessionId' not in response: 254 response = response['value'] /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None)) /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default): WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist 




## B.) That I have tried to use afterwards


options = webdriver.ChromeOptions() options.add_argument('--headless') driver = webdriver.Chrome(executable_path=CHROME_PATH, options=chrome_options) 


error message

--------------------------------------------------------------------------- WebDriverException Traceback (most recent call last)  in  1 options = webdriver.ChromeOptions() 2 options.add_argument('--headless') -- 3 driver = webdriver.Chrome(executable_path=CHROME_PATH, 4 options=chrome_options) /uslocal/lib/python3.8/dist-packages/selenium/webdrivechrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive) 71 service_args=service_args, 72 log_path=service_log_path) - 73 self.service.start() 74 75 try: /uslocal/lib/python3.8/dist-packages/selenium/webdrivecommon/service.py in start(self) 96 count = 0 97 while True: - 98 self.assert_process_still_running() 99 if self.is_connectable(): 100 break /uslocal/lib/python3.8/dist-packages/selenium/webdrivecommon/service.py in assert_process_still_running(self) 107 return_code = self.process.poll() 108 if return_code is not None: 109 raise WebDriverException( 110 'Service %s unexpectedly exited. Status code was: %s' 111 % (self.path, return_code) WebDriverException: Message: Service /usbin/chromium-browser unexpectedly exited. Status code was: 1 



## C.) That I have tried to use afterwards


# selenium 4 from selenium import webdriver from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome import ChromeDriverManager ​ driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install())) 


ERROR message

[WDM] - ====== WebDriver manager ====== 2022-07-13 10:30:16,809 INFO ====== WebDriver manager ====== --------------------------------------------------------------------------- KeyError Traceback (most recent call last)  in  4 from webdriver_manager.chrome import ChromeDriverManager 5 -- 6 driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install())) ~/.local/lib/python3.8/site-packages/webdriver_managechrome.py in install(self) 36 37 def install(self) -> str: - 38 driver_path = self._get_driver_path(self.driver) 39 os.chmod(driver_path, 0o755) 40 return driver_path ~/.local/lib/python3.8/site-packages/webdriver_managecore/manager.py in _get_driver_path(self, driver) 27 28 def _get_driver_path(self, driver): - 29 binary_path = self.driver_cache.find_driver(driver) 30 if binary_path: 31 return binary_path ~/.local/lib/python3.8/site-packages/webdriver_managecore/driver_cache.py in find_driver(self, driver) 93 os_type = driver.get_os_type() 94 driver_name = driver.get_name() - 95 driver_version = driver.get_version() 96 browser_version = driver.browser_version 97 ~/.local/lib/python3.8/site-packages/webdriver_managecore/driver.py in get_version(self) 41 def get_version(self): 42 self._version = ( - 43 self.get_latest_release_version() 44 if self._version == "latest" 45 else self._version ~/.local/lib/python3.8/site-packages/webdriver_managedrivers/chrome.py in get_latest_release_version(self) 35 36 def get_latest_release_version(self): - 37 self.browser_version = get_browser_version_from_os(self.chrome_type) 38 log(f"Get LATEST {self._name} version for {self.browser_version} {self.chrome_type}") 39 latest_release_url = ( ~/.local/lib/python3.8/site-packages/webdriver_managecore/utils.py in get_browser_version_from_os(browser_type) 150 return get_browser_version(browser_type, metadata) 151 152 cmd_mapping = { 153 ChromeType.BRAVE: { 154 OSType.LINUX: linux_browser_apps_to_cmd( KeyError: 'google-chrome' 






### Operating System aws ec2 ubuntu 20.04 LTS ### Selenium version 3.141.0 ### What are the browser(s) and version(s) where you see this issue? None it is in an aws ec2 jupyter notebook, desktop browser is Version 103.0.5060.114 (Official Build) (64-bit) ### What are the browser driver(s) and version(s) where you see this issue? Version 103.0.5060.114 (Official Build) (64-bit) ### Are you using Selenium Grid? no 
submitted by glassAlloy to learnprogramming [link] [comments]

Flask app deployed on Heroku initially works fine, but fails after reload

I have flask that is essentially using selenium to scrap a website. This app is deployed on Heroku. On my local computer, I am facing no errors although, on Heroku I am not getting this error initially, but when I reload the page, a server error page is shown and in the logs I find this.
urllib3.exceptions.MaxRetryError 
This error is caused by a
NewConnectionError 
Which occurs, while handling another error
ConnectionRefusedError: [Errno 111] Connection refused 
The following is the code
from flask import Flask from flask import request from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import os chrome_options = webdriver.ChromeOptions() chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") chrome_options.add_argument("--headless") chrome_options.add_argument("--disable-dev-shm-usage") chrome_options.add_argument("--no-sandbox") driver = webdriver.Chrome(executable_path=os.environ.get("CHROMEDRIVER_PATH"),options=chrome_options) app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def handleRequests(): url = str(request.args.get('url')) driver.get(url) try: element = WebDriverWait(driver, 10).until( EC.presence_of_element_located((By.XPATH , xpath)) ) finally: data = element.text driver.quit() return str(data) if __name__ == "__main__": app.run() 
Note CHROMEDRIVER_PATH and GOOGLE_CHROME_BIN are config vars
submitted by I5_7H15_MY_U53RNAME to Heroku [link] [comments]

ERROR - Using Selenium in a JS continuously loading webpage via python web crawling task from an ec2 aws ubuntu 20.04 LTS instance

GOAL


- Use Selenium in a JS continuously loading webpage via python web crawling task from an ec2 aws ubuntu 20.04 LTS instance


MAIN CODE PART



CHROME_PATH = '/usbin/chromium-browser' CHROMEDRIVER_PATH = '/usbin/chromedriver' WINDOW_SIZE = '1200, 800' chrome_options = Options() chrome_options.add_argument('headless') # chrome runs without a GUI window - as server doesn't have a gui chrome_options.add_argument('window-size=%s' % WINDOW_SIZE) #chrome_options.add_argument('ignore-ssl-errors') chrome_options.add_argument('hide-scrollbars') chrome_options.binary_location = CHROME_PATH options = webdriver.ChromeOptions() options.add_argument('--headless') driver = webdriver.Chrome(executable_path=CHROME_PATH, options=chrome_options) 


A.) That I have tried to use afterwards



driver = webdriver.Chrome( executable_path=CHROMEDRIVER_PATH, chrome_options=chrome_options, ) 



Warning message generated that is on for 1 min

:1: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome( 


Than after 1 min error message
:1: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome( --------------------------------------------------------------------------- WebDriverException Traceback (most recent call last)  in  -- 1 driver = webdriver.Chrome( 2 executable_path=CHROMEDRIVER_PATH, 3 chrome_options=chrome_options, 4 ) 5 /uslocal/lib/python3.8/dist-packages/selenium/webdrivechrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive) 74 75 try: - 76 RemoteWebDriver.__init__( 77 self, 78 command_executor=ChromeRemoteConnection( /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options) 155 warnings.warn("Please use FirefoxOptions to set browser profile", 156 DeprecationWarning, stacklevel=2) 157 self.start_session(capabilities, browser_profile) 158 self._switch_to = SwitchTo(self) 159 self._mobile = Mobile(self) /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/webdriver.py in start_session(self, capabilities, browser_profile) 250 parameters = {"capabilities": w3c_caps, 251 "desiredCapabilities": capabilities} 252 response = self.execute(Command.NEW_SESSION, parameters) 253 if 'sessionId' not in response: 254 response = response['value'] /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None)) /uslocal/lib/python3.8/dist-packages/selenium/webdriveremote/errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default): WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist 




B.) That I have tried to use afterwards



options = webdriver.ChromeOptions() options.add_argument('--headless') driver = webdriver.Chrome(executable_path=CHROME_PATH, options=chrome_options) 


error message

--------------------------------------------------------------------------- WebDriverException Traceback (most recent call last)  in  1 options = webdriver.ChromeOptions() 2 options.add_argument('--headless') -- 3 driver = webdriver.Chrome(executable_path=CHROME_PATH, 4 options=chrome_options) /uslocal/lib/python3.8/dist-packages/selenium/webdrivechrome/webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, keep_alive) 71 service_args=service_args, 72 log_path=service_log_path) - 73 self.service.start() 74 75 try: /uslocal/lib/python3.8/dist-packages/selenium/webdrivecommon/service.py in start(self) 96 count = 0 97 while True: - 98 self.assert_process_still_running() 99 if self.is_connectable(): 100 break /uslocal/lib/python3.8/dist-packages/selenium/webdrivecommon/service.py in assert_process_still_running(self) 107 return_code = self.process.poll() 108 if return_code is not None: 109 raise WebDriverException( 110 'Service %s unexpectedly exited. Status code was: %s' 111 % (self.path, return_code) WebDriverException: Message: Service /usbin/chromium-browser unexpectedly exited. Status code was: 1 


C.) That I have tried to use afterwards



# selenium 4 from selenium import webdriver from selenium.webdriver.chrome.service import Service as ChromeService from webdriver_manager.chrome import ChromeDriverManager ​ driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install())) 


ERROR message

[WDM] - ====== WebDriver manager ====== 2022-07-13 10:30:16,809 INFO ====== WebDriver manager ====== --------------------------------------------------------------------------- KeyError Traceback (most recent call last)  in  4 from webdriver_manager.chrome import ChromeDriverManager 5 -- 6 driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install())) ~/.local/lib/python3.8/site-packages/webdriver_managechrome.py in install(self) 36 37 def install(self) -> str: - 38 driver_path = self._get_driver_path(self.driver) 39 os.chmod(driver_path, 0o755) 40 return driver_path ~/.local/lib/python3.8/site-packages/webdriver_managecore/manager.py in _get_driver_path(self, driver) 27 28 def _get_driver_path(self, driver): - 29 binary_path = self.driver_cache.find_driver(driver) 30 if binary_path: 31 return binary_path ~/.local/lib/python3.8/site-packages/webdriver_managecore/driver_cache.py in find_driver(self, driver) 93 os_type = driver.get_os_type() 94 driver_name = driver.get_name() - 95 driver_version = driver.get_version() 96 browser_version = driver.browser_version 97 ~/.local/lib/python3.8/site-packages/webdriver_managecore/driver.py in get_version(self) 41 def get_version(self): 42 self._version = ( - 43 self.get_latest_release_version() 44 if self._version == "latest" 45 else self._version ~/.local/lib/python3.8/site-packages/webdriver_managedrivers/chrome.py in get_latest_release_version(self) 35 36 def get_latest_release_version(self): - 37 self.browser_version = get_browser_version_from_os(self.chrome_type) 38 log(f"Get LATEST {self._name} version for {self.browser_version} {self.chrome_type}") 39 latest_release_url = ( ~/.local/lib/python3.8/site-packages/webdriver_managecore/utils.py in get_browser_version_from_os(browser_type) 150 return get_browser_version(browser_type, metadata) 151 152 cmd_mapping = { 153 ChromeType.BRAVE: { 154 OSType.LINUX: linux_browser_apps_to_cmd( KeyError: 'google-chrome' 






### Operating System aws ec2 ubuntu 20.04 LTS ### Selenium version 3.141.0 ### What are the browser(s) and version(s) where you see this issue? None it is in an aws ec2 jupyter notebook, desktop browser is Version 103.0.5060.114 (Official Build) (64-bit) ### What are the browser driver(s) and version(s) where you see this issue? Version 103.0.5060.114 (Official Build) (64-bit) ### Are you using Selenium Grid? no 
submitted by glassAlloy to selenium [link] [comments]

Where do downloaded files go ?

Hey :) I'm new to heroku and can't find a solution to my question while I searched a lot :(
My problem is the following : I'm running selenium to create a pdf from a specific web page. Everything works super fine locally, but when I deploy I can't retrieve the files that selenium - I think - generates...
To be specific, my Python script uses a selenium Chrome webdriver and run a script to simulate the printing box with desired parameters. It's suppose to download the PDF, but I can't retrieve it anywhere.
Here is the function I am speaking about :
def MyPdfSaver(study_url): # set webdriver and set chrome_options/settings chrome_options = webdriver.ChromeOptions() settings = { "recentDestinations": [{ "id": "Save as PDF", "origin": "local", "account": "", }], "selectedDestinationId": "Save as PDF", "version": 2, "isCssBackgroundEnabled": True } prefs = { 'printing.print_preview_sticky_settings.appState': json.dumps(settings) } chrome_options.add_experimental_option('prefs', prefs) chrome_options.add_argument('--kiosk-printing') chrome_options.add_argument('--headless') chrome_options.add_argument("--disable-dev-shm-usage") chrome_options.add_argument("--no-sandbox") # set chrome bin location & driver (change paths to run locally) chrome_options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") driver = webdriver.Chrome( executable_path=os.environ.get("CHROMEDRIVER_PATH"), chrome_options=chrome_options) driver.get(study_url) # necessary for webpage to fully load time.sleep(3) html_source = driver.page_source driver.execute_script('return window.print();') #is supposed to run the pdf printing return str(type(html_source)) #just a try to see if it returns my driver well, and it does 
So the main question : is my "driver.execute_script('return window.print();')"supposed to work ? And if it's the case, where do the downloaded file goes ?
I know heroku has a temporary file storage but in fact I would like to directly send the PDF elsewhere and simply return an string url...
If you have any clue, it would be super :) Thank you !
submitted by Deseart27 to Heroku [link] [comments]

udemy course reviews not fetching

i am trying to scrape udemy course reviews for analysis using selenium. but for some reason I cant get a result. I am able to successfully scrape title, description, ratings, but not REVIEWS. please help!

test_url = "https://www.udemy.com/course/machinelearning/" PATH = "C:\Program Files (x86)\chromedriver.exe" options = webdriver.ChromeOptions() options.binary_location = "C:\Program Files\Google\Chrome\Application\chrome.exe" driver = webdriver.Chrome(PATH, options=options) driver.get(test_url) # Parse processed webpage with BeautifulSoup soup = BeautifulSoup(driver.page_source,features="lxml")
course_review = [] udemy_review = soup.findAll("div",{ "class":"udlite-text-sm individual-review--individual-review__comment--2o94n"}) #, {"class": "udlite-text-sm individual-review--individual-review__comment--2o94n"}) reviews = [] for i in udemy_review: reviews.append(i.text) print(reviews) print(udemy_review)
submitted by jaygala223 to selenium [link] [comments]

Looking for a script to login my work website

Hi, as per title I need to login my work website many times per day, and doing it with ahk would save me quite some time.
I know I could just save the credentials on the browser, but I don't like saving passwords in my browser.
I have been googling for an answer but all script I found seems overly complicated and very long for such a small task.
To login I need to type user and password in the respective input then need to click the login button in a chromium browser or firefox.
Is there a concise short script to achieve this?
Any help is appreciated, thanks.

Update:

If anyone look for an answer, I made a python script that runs selenium drivers to make me login then I use ahk to run that script on a shortcut. It's doing what I was looking for for now.

auto-login.py

```python from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By
options = Options()
options.binary_location=r'C:/Program Files/Google/Chrome/Application/chrome.exe'
options.add_experimental_option('excludeSwitches', ['enable-logging'])
s = Service('./chromedriver_win32/chromedriver.exe')
browser = webdriver.Chrome(service=s, options=options)
url='http://localhost'
username = "name"
password = "pass"
browser.get(url)
browser.find_element(By.ID,"userId").send_keys(username)
browser.find_element(By.ID,"userPwd").send_keys(password)
browser.find_element(By.ID,"loginBtn").click()
print("\nLogged-in succesfully..."); ```

auto-login.ahk

``` ; Autoexecute #NoEnv #SingleInstance force return
+F1:: ;Shift+F1 run cmd.exe
WinWait, ahk_exe cmd.exe ; Intention to make sure the next line doesn't execute too soon and not hit CMD (I have not checked for an appropriate WinTitle. But you can definitely get it.) Send c:{enter} ; Go to C drive Send cd C:\path\to\script{enter} ; Go to script's folder Send python auto-login.py{enter} ; Execute python script Sleep, 4000 ; Wait for the login process to finish if WinExist("C:\Windows\SYSTEM32\cmd.exe") ; Close cmd.exe window after successfully login. WinClose ; Use the window found by WinExist. 
return ```
submitted by Ademantis to AutoHotkey [link] [comments]

TypeError: __init__() got an unexpected keyword argument 'executable_parth'

I will try to create some python script using selenium web-driver. and I get stuck in this error. help
TypeError: __init__() got an unexpected keyword argument 'executable_parth' 
an error was related to this line
browser_one = webdriver.Opera(executable_parth=r"C:\Users\cm\AppData\Local\Programs\Opera\New folder\operadriver_win64\operadriver.exe",option = Options) 
and this is the full script I rote
from selenium import webdriver import time from random import randrange from selenium.webdriver.opera.options import Options #refresh time in second refresh_time = 20 browser_list = [] option = Options() #opera exe parth Options.binary_location = r"C:\Users\cm\AppData\Local\Programs\Opera\opera.exe" #Opera Driver Ex parth for browsers browser_one = webdriver.Opera(executable_parth=r"C:\Users\cm\AppData\Local\Programs\Opera\New folder\operadriver_win64\operadriver.exe",option = Options) browser_two = webdriver.Opera(executable_parth=r"C:\Users\cm\AppData\Local\Programs\Opera\New folder\operadriver_win64\operadriver.exe",option = Options) browser_three = webdriver.Opera(executable_parth=r"C:\Users\cm\AppData\Local\Programs\Opera\New folder\operadriver_win64\operadriver.exe",option = Options) browser_list.append(browser_one) browser_list.append(browser_two) browser_list.append(browser_three) for browser in browser_list: #Your Links to be addd traffic browser.get("https://www.google.com/") while (True): browser_num = randrage(0, len(browser_list)) browser_list[browser_num] print("browser number" , browser_num, "refreshed") time.sleep(refresh_time) #Links for trafic browser_one.get("https://www.google.com/") browser_two.get("https://www.google.com/") browser_three.get("https://www.google.com/") browser.close() 
submitted by AppearanceIcy5593 to learnpython [link] [comments]

Fundigelicals really process things the way children do. There is an abundance of binary thinking. "Do you follow Jesus or are you an enemy of god?" There's a bunch of options in between, Karen!!

Fundigelicals really process things the way children do. There is an abundance of binary thinking. submitted by JarethOfHouseGoblin to exchristian [link] [comments]

Error when trying to run selenium with portable chrome. (Linux - Debian base)

from selenium import webdriver from selenium.webdriver.common.keys import Keys chromePath = "path-to /ChromePortableGCPM/data/cron/google-chrome" driverPath = "path to /ChromePortableGCPM/data/VHOME/Downloads/chromedriver" options = webdriver.ChromeOptions() options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage') options.binary_location = chromePath driver = webdriver.Chrome(driverPath, options=options) driver.get('http://google.com/') 
Error message:
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /path - to/ChromePortableGCPM/data/cron/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
submitted by PJFurious to selenium [link] [comments]

adding non binary options is a big step in the right direction

Im really glad that they added non binary option and they/them pronouns , there are alot of people that wanted this option and it helps them get immersed even more
this shows that larian is thinking about the entire community
submitted by ticaaaa to BaldursGate3 [link] [comments]

Gamers upset, because Baldur's Gate 3 introduces Non-Binary as gender option

Gamers upset, because Baldur's Gate 3 introduces Non-Binary as gender option submitted by TheUnknown2903 to Gamingcirclejerk [link] [comments]

FTX's European subsidiary was built on top of a binary options scam

FTX's European subsidiary was built on top of a binary options scam submitted by hydroza to Buttcoin [link] [comments]

Narrowing it down: location options for backpacking!

Narrowing it down: location options for backpacking!
Hi everyone! I’m back and there are my four real contenders for backpacking. Anyone who has experience with any of these routes please let me know, but everyone is welcome to comment thoughts! ALSO: South America route passes through Brazil and Argentina barely, not doing the countries. Mexico starts either in Mexico City or Cancun.
submitted by Prussia1870 to backpacking [link] [comments]

How can I improve this automation ?

Hi everyone,

I hope you're feeling good today.

I'm new at programming, I begun writing my first code 2 days ago and it look's like this :

from typing import Text import openpyxl from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.chrome.options import Options import urllib3 from playsound import playsound http = urllib3.PoolManager() resp = http.request("GET", "http://httpbin.org/robots.txt") resp.status resp.data b"User-agent: *\nDisallow: /deny\n" #Intialisation book = openpyxl.load_workbook('Fichier_Prospects.xlsx') chrome_path = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" chromedriver_path="chromedriver.exe" #Chrome Options window_size = "1920,1080" chrome_options = Options() chrome_options.add_argument("--headless") chrome_options.add_argument("--window-size=%s" % window_size) chrome_options.binary_location = chrome_path #Workbook = ws ws = book.active beginning_cell = 3900 y = 0 #Define cell range cells = ws['A{}'.format(beginning_cell) :'B3928'] #Init lists li1 = [] li2 = [] #Put values into lists for c1, c2 in cells: li1.append(c1) li2.append(c2) ws['C1'] = 'Numero' #Phone number searching function def phonesearch(): driver = webdriver.Chrome(executable_path=chromedriver_path,options=chrome_options) driver.get("https://google.com") #Skip the conditions pop up accept_conditions = driver.find_element_by_id('L2AGLb') accept_conditions.click() #Find the search bar searchbar = driver.find_element_by_name('q') #Print the phone number into the search bar searchbar.send_keys('{} {}'.format(li1[y].value, li2[y].value)) searchbar.send_keys(' numéro de téléphone') searchbar.send_keys(Keys.RETURN) print('Ligne n°{}'.format(beginning_cell)) #look for Phone number existence try: phonenumber = driver.find_element_by_class_name('mw31Ze').text ws.cell(row=beginning_cell, column=3).value=phonenumber print('{} {}'.format(li1[y].value, li2[y].value)) print(phonenumber) #If no phone number found except NoSuchElementException: ws.cell(row=beginning_cell, column=3).value='Pasdenum' print('{} {}'.format(li1[y].value, li2[y].value)) print('Pas de numero') driver.quit() #Add phone numbers to the Sheet for i in cells: phonesearch() beginning_cell += 1 y += 1 book.save(filename = 'Fichier_Prospects.xlsx') print("Le programme s'est terminé correctement") playsound('metro-boomin.mp3') 

This program reads informations from an Excel sheet to search phone numbers on Google using Selenium and Openpyxl.

Here is the result resumed in a video :
https://www.youtube.com/watch?v=NRpOX-Xd2rY

Today, I would know if some of you could help me improving my knowledges by giving me some tips to shortcut this code. I think for an experimented programmer, this code is looking so messy x).

Thanks in advance for any answer !
submitted by Medaillek to learnpython [link] [comments]

Are there any truly verified great Binary option traders as in Binary options Wizards?

I am just curious for all experienced options traders, who are are the best fully documented Binary options traders alive? I have searched without much concrete results. I read a copy of Anna Collings book that hints it is possible to make a living of off BO if done right. And I heard from Cam (Tradingnut) mentioned a successful trader who eventually switched to forex when his country (UK) banned BO. Other than that anecdotally I saw some social media posts where people said they make money. Just curious . For context I am a developing trader mainly in forex (swing trading) at the moment. My interest in BO is just for practice run as I learn vanilla options to hedge my downside fx risk. Thanks all for time and feedback in advance.
submitted by quora_22 to binaryoptions [link] [comments]

There are only 24 hours in a day, and with long job working hours, it is challenging to make time for trading. But there is a way to make a profit on your money in a short period, as short as 60 seconds.Binary options trading is an expeditious way to make a good profit on your money without having to sit and check trading charts the whole day.. We bring forth for you some best binary option ... Adaptively blur pixels, with decreasing effect near edges. A Gaussian operator of the given radius and standard deviation (sigma) is used.If sigma is not given it defaults to 1.. The sigma value is the important argument, and determines the actual amount of blurring that will take place.. The radius is only used to determine the size of the array which holds the calculated Gaussian distribution. When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.2, “Specifying Program Options”.The most common methods are to provide options in an option file or on the command line. However, in most cases it is desirable to make sure that the server uses the same options each time it runs. To post data purely binary, you should instead use the --data-binary option. To URL-encode the value of a form field you may use --data-urlencode. If any of these options is used more than once on the same command line, the data pieces specified will be merged with a separating &-symbol. Specify the intended location of the output file. ... In the case that both file and data options are set, ... Node-sass includes pre-compiled binaries for popular platforms, to add a binary for your platform follow these steps: Check out the project: git clone --recursive https: ... You can use the mysqld options and system variables that are described in this section to affect the operation of the binary log as well as to control which statements are written to the binary log. For additional information about the binary log, see Section 5.4.4, “The Binary Log”.For additional information about using MySQL server options and system variables, see Section 5.1.7 ... Digital Options are offered by OTC (over the counter) Brokers who are matching the orders between different traders.The investment amount can be little as $1 or high as $1,000. This is depending on the platform where you trade Binary Options.. Even if you are a beginner in binary trading it is possible to start with a free demo account.That means you are trading with virtual money and do not ... How to Compare Brokers and Trading Platforms. In order to trade binary options, you need to engage the services of a binary options broker. Here at binaryoptions.net we have provided a list with all the best comparison factors that will help you select which binary trading platform to open an account with. You can use the mysqld options and system variables that are described in this section to affect the operation of the binary log as well as to control which statements are written to the binary log. For additional information about the binary log, see Section 5.4.4, “The Binary Log”.For additional information about using MySQL server options and system variables, see Section 5.1.6 ... Definition: What are Binary Options? Binary Options are a financial instrument that gained the attention of many traders in the past years.You can trade on long or short markets within a defined period of time. The special thing about Binary Options is: You got only two options as a trader.Whether you lose all your money with one trader or you get a high, fixed payout between 75 and 95 % of ...

[index] [107] [766] [649] [322] [210] [20] [160] [871] [781] [208]

#