title: Why doesn't instagram work with Selenium headless Chrome?
body: <p>I'm trying to build an insta bot that works headless, but it don't seem to find the username, password columns (i.e NoSuchElementException).</p>
  <p>I tried to run this code to troubleshoot. (which basicaly opens the ig homepage and screenshots it)</p>
  <pre><code>from selenium import webdriver
  from time import sleep
  
  options = webdriver.ChromeOptions()
  options.headless = True
  options.add_argument(&quot;--window-size=1920,1080&quot;)
  browser = webdriver.Chrome(options=options)
  browser.get(&quot;https://www.instagram.com&quot;)
  browser.get_screenshot_as_file(f&quot;screenshot.png&quot;)
  </code></pre>
  <p>and i got these screenshots <a href="https://i.stack.imgur.com/B6LeB.png" rel="nofollow noreferrer">basically saying 'error, retry after several minutes' in french</a></p>
  <p>I tried finding the 'connectez-vous' button thru selenium, but every xpath i try doesn't work, and it's impossible to find it thru f12</p>
  <p>The bot will be later uploaded to pythonanywhere so i can run it in the cloud (so if you think i might run into some other problems you can let me know)</p>
  <p>What do you suggest me to do?</p>