Created
March 13, 2013 14:43
-
-
Save jeremyjbowers/5152779 to your computer and use it in GitHub Desktop.
Scraping example for Chad Skelton. This one means no mechanize required.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| pip install beautifulsoup4==4.1.3 requests==1.1.0 | |
| """ | |
| import requests | |
| from bs4 import BeautifulSoup | |
| url = 'https://eservice.pssg.gov.bc.ca/LRA/reporting/public/activeterm.do?method=get' | |
| data = { | |
| 'registrationRole': 'all', | |
| 'registrationStatus': 'all', | |
| 'surName': '', | |
| 'partial': 'NO', | |
| 'clientName': '', | |
| 'clientPartial': 'NO', | |
| 'startDateBetween': 'YES', | |
| 'startDate': '03/13/1990', | |
| 'endDate': '03/13/2013' | |
| } | |
| r = requests.post(url, data=data, verify=False) | |
| soup = BeautifulSoup(r.content) | |
| print soup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment