choubeyaakash77

Request on Google Images is Depreciated

Dec 24th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. from bs4 import BeautifulSoup
  2. import requests
  3. from PIL import Image
  4. from io import BytesIO
  5.  
  6.  
  7. search = input("Search for : ")
  8. params = {"tbm": "isch", "source": "hp", "q": search}
  9. r = requests.get("https://www.google.com/search", params=params)
  10. print("URL :", r.url)
  11. print("Status : ", r.status_code, "\n\n")
  12.  
  13. f = open("ImageResult.html", "w+")
  14. f.write(r.text)
Add Comment
Please, Sign In to add comment