title: POST Request to Heroku in Python - 403 Forbidden
body: <p>I'm learning web scraping and building a simple web app at the moment, and I decided to practice scraping a schedule of classes. Here's a code snippet I'm having trouble with in my application, using Python 2.7.4, Flask, Heroku, BeautifulSoup4, and Requests.    </p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup as Soup
  
  url = "https://telebears.berkeley.edu/enrollment-osoc/osc"
  code = "26187"
  values = dict(_InField1 = "RESTRIC", _InField2 = code, _InField3 = "13D2")
  html = requests.post(url, params=values)
  soup = Soup(html.content, from_encoding="utf-8")
  
  sp = soup.find_all("div", {"class" : "layout-div"})[2]
  print sp.text
  </code></pre>
  
  <p>This works great locally. It gives me back the string "Computer Science 61A P 001 LEC:" as expected. However, when I tried to run it on Heroku (using <code>heroku run bash</code> and then run <code>python</code>), I got back an error,<code>403 Forbidden</code>. </p>
  
  <p>Am I missing some settings on Heroku? At first I thought it's the school settings, but then I was wondering why it works locally without any trouble... Any explanation/suggestion would be really appreciated! Thank you in advance.</p>