title: how do i login to this site
body: <p>noob here. Im trying to login to this site <a href="https://odoo.com" rel="nofollow noreferrer">odoo.com</a> with python but it isnt working. There is no evidence that im logged in (im getting 'none' from the print statement, this means the data im expecting if i were logged in isnt there) and i cant figure out why.</p>
  <p>I think it has something to do with the 'onsubmit' in the form.</p>
  <p>Here is my code</p>
  <pre><code>from cred import password, login
  import requests
  from bs4 import BeautifulSoup as bs
  headers = {
      'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8',
      'Origin': 'https://www.odoo.com',
      'Referer': 'https://www.odoo.com/web/login',
      'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36',
  }
  
  def get_csrf():
      #get csrf_token
      r = s.get('https://www.odoo.com/web/login')
      soup = bs(r.content,'html.parser')
      g = soup.head.script.text
      g = g.split('\&quot;')
      csrf_token = g[1]
      return csrf_token
  
  with requests.Session() as s:
      csrf_token = get_csrf()
      data = {
          'csrf_token': csrf_token,
          'login': login,
          'password': password,
          'redirect': ''
      }
      r = s.post('https://www.odoo.com/web/login', headers=headers, data=data)
      re = s.get('https://www.odoo.com/my/databases')
      soup = bs(re.content,'html.parser')
      print(soup.find('div',{'class':'odoo-oe-databases'}))
  </code></pre>
  <p>any help is appreciated</p>