Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. from bs4 import BeautifulSoup
  2. import requests
  3.  
  4. url = "http://www.google.com"
  5. response = requests.get(url)
  6. soup = BeautifulSoup(response.text, "html.parser")
  7. links = soup.find_all("a")
  8. for link in links:
  9. print(link.text)
  10.  
  11. error: UnicodeEncodeError: 'gbk' codec can't encode charactor 'xbb' in position 5:
  12. illegal multibyte sequence.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement