title: Python: Remain logged in a website using mechanicalsoup
body: <p>I am a newbie in Python. I want to write a script in python where I run thousands of URLs and save the response. In order to access these URLs, credentials are required. So, I have written a basic script which goes to the URL and print the response. When I go through multiple URL, the website returns the error that multiple users are logged in. So, I would like to login once and run other URLs in the same logged in session. Is there any way I can do that using Mechanical soup. </p>
  
  <p>Here is my script:</p>
  
  <pre><code>import mechanicalsoup
  
  browser = mechanicalsoup.StatefulBrowser()
  browser.open("mywebsite1")
  
  browser.select_form('form[action="/login"]')
  browser.get_current_form().print_summary()
  browser["userId"] = "myusername"
  browser["password"] = "mypassword"
  
  response = browser.submit_selected()
  browser.launch_browser()
  print(response.text)
  browser.open("mywebsite2")
  print(response.text)
  ...... so on for all the URLs
  </code></pre>
  
  <p>How can I save my session? Thanks in advance for your help</p>