0

I'm trying to call a python .py web scraping script from another script.

I'm doing a lot of different try on Jupyter with different codes but the output is the same: No signal at all of any kind of task completed, it seems it stops at the very beginnig.

As said, it is a web scraping script I'm doing with undetected chromedriver (mandatory requirement to complete the script cause the website can detect the presence of a bot); I've tried doing it with the normal chromedriver and it works so I think the issue here is related with the undetected one.

This is the code, How can i move on?

def combinations(items):
    result = []
    for i in range(1, len(items) + 1):
        result.extend(itertools.combinations(items, i))
    return result

driver = uc.Chrome(executable_path=r"C:\\Users\\xx\\chromedriver.exe",service_args=['--quiet'])
driver.set_window_size(1024, 600)
driver.maximize_window()
driver.implicitly_wait(6.5)
wait=WebDriverWait(driver,10)
driver.get("https://www.bet365.it")
Carolino
  • 51
  • 5
  • did you try without Jupyter? Maybe this is problem only with Jupyter. And maybe when you will run directly in console it will show some error message which helps to see problem. – furas May 01 '22 at 23:43
  • If I run it on console it loads and then nothing more, is related to Undetected chromedriver for sure – Carolino May 02 '22 at 20:39
  • What did you expected? This code only loads page, nothing more. You don't use `driver.find_element()` to get something from page, you don't use `print()` to display it - so you can't get results. – furas May 02 '22 at 20:46
  • It prints a couple of page obviously, I've pasted only the initial part of the code. The issue is if I run it with normal chromedriver it works normally – Carolino May 02 '22 at 20:56
  • did you try to use `print()` between command to see line makes problem? Did you try without `--quite` to see some information? – furas May 02 '22 at 21:05
  • BTW: if you use prefix `r` then you need \ instead of \\ – furas May 02 '22 at 21:06

0 Answers0