Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32rent.py", line 5, in <module>
  3. sauce = urllib.request.urlopen("http://www.equityapartments.com/washington-dc/georgetown/2400-m-apartments##unit-availability-tile").read()
  4. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32liburllibrequest.py", line 162, in urlopen
  5. return opener.open(url, data, timeout)
  6. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32liburllibrequest.py", line 471, in open
  7. response = meth(req, response)
  8. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32liburllibrequest.py", line 581, in http_response
  9. 'http', request, response, code, msg, hdrs)
  10. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32liburllibrequest.py", line 509, in error
  11. return self._call_chain(*args)
  12. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32liburllibrequest.py", line 443, in _call_chain
  13. result = func(*args)
  14. File "C:UsersEun Hae LeeAppDataLocalProgramsPythonPython35-32liburllibrequest.py", line 589, in http_error_default
  15. raise HTTPError(req.full_url, code, msg, hdrs, fp)
  16. urllib.error.HTTPError: HTTP Error 400: Bad Request
  17.  
  18. import urllib.request
  19. import bs4 as bs
  20.  
  21. sauce = urllib.request.urlopen("http://www.equityapartments.com/washington-dc/georgetown/2400-m-apartments##unit-availability-tile").read()
  22. soup = bs.beautifulsoup(sauce, 'html.parser')
  23.  
  24. print(soup)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement