when I try to enter the site (https://www.ticketcorner.ch/en/artist/iihf-eishockey-weltmeisterschaft/2020-iihf-ice-hockey-world-championship-einzelspiel-tickets-zuerich-2463148/?affiliate=IIH)using Selenium webdriver, I get captcha or blocking page. Are there any ways to get around this without using captcha recognition services? Thank you.
UPD. Attached captcha img enter image description here
import time
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from multiprocessing import Pool, freeze_support
from bs4 import BeautifulSoup
def main():
options = webdriver.ChromeOptions()
options.add_argument('headless')
driver = webdriver.Chrome(chrome_options=options)
driver.get('https://www.ticketcorner.ch/en/artist/iihf-eishockey-weltmeisterschaft/2020-iihf-ice-hockey-world-championship-einzelspiel-tickets-zuerich-2463148/?affiliate=IIH')
while True:
time.sleep(3)
driver.refresh()
try:
WebDriverWait(driver, 30).until(EC.presence_of_element_located((By.XPATH, '//h2[@class="event-listing-city theme-headline-color"]')))
source = driver.page_source
soup = BeautifulSoup(source, 'lxml')
elements = soup.find_all('h2', class_='event-listing-city theme-headline-color')
matches = []
for elem in elements:
matches.append(elem.text)
print(matches)
except Exception as e:
print('Parsing error', str(e))
if __name__ == "__main__":
main()