title: How to avoid a bot detection and scrape a website using python?
body: <p>My Problem:</p>
  <p>I want to scrape the following website: <a href="https://www.coches.net/segunda-mano/" rel="nofollow noreferrer">https://www.coches.net/segunda-mano/</a>.
  But every time i open it with python selenium, i get the message, that they detected me as a bot.
  How can i bypass this detection?
  First i tried simple code with selenium:</p>
  <pre><code>from selenium import webdriver
  from bs4 import BeautifulSoup
  
  browser = webdriver.Chrome('C:/Python38/chromedriver.exe')
  URL = 'https://www.coches.net/segunda-mano/'
  browser.get(URL)
  </code></pre>
  <p>Then i tried it with request, but i doesn't work, too.</p>
  <pre><code>from selenium import webdriver
  from bs4 import BeautifulSoup
  
  from fake_useragent import UserAgent
  
  import requests
  
  ua = UserAgent()
  
  headers = {&quot;UserAgent&quot;:ua.random}
  
  URL = 'https://www.coches.net/segunda-mano/'
  r = requests.get(URL, headers = headers)
  
  print(r.statuscode)
  </code></pre>
  <p>In this case i get the message 403 = Status code stating that access to the URL is prohibited.</p>
  <p>Don't know how to get entry to this webpage without getting blocked. I would be very grateful for your help. Thanks in advance.</p>