Advertisement
Guest User

Parking

a guest
Dec 21st, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4. def find_stuff():
  5. url = "http://parking.fullerton.edu/ParkingLotCounts/mobile.aspx"
  6. source_code = requests.get(url)
  7. plain_text = source_code.text
  8. soup = BeautifulSoup(plain_text)
  9. for link in soup.findAll('p', {'class': "LocationName"}):
  10. location = link.string
  11. print(location)
  12.  
  13. for link in soup.findAll('p', {'class': "LastUpdated"}):
  14. time = link.string
  15. print(time)
  16.  
  17. for link in soup.findAll('p', {'class': "AvailableCountYellow ZeroTopBottom"}):
  18. available = link.string
  19. print(available)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement