Karthik324

Untitled

Jun 1st, 2019
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. import pyperclip
  2. import requests
  3. import bs4
  4.  
  5. keyword = pyperclip.paste()
  6. print(keyword)
  7. res = requests.get('https://google.com/search?q='+keyword)
  8. soup = bs4.BeautifulSoup(res.content,'html.parser')
  9. links = soup.findAll('.r a')
  10. for link in links:
  11.     print(link["href"])
Add Comment
Please, Sign In to add comment