Skip to content

Instantly share code, notes, and snippets.

@pythonpaul
Last active September 28, 2019 18:05
Show Gist options
  • Save pythonpaul/01d04fe5f55c96f0ef093131ab4b7aca to your computer and use it in GitHub Desktop.
Save pythonpaul/01d04fe5f55c96f0ef093131ab4b7aca to your computer and use it in GitHub Desktop.
"raw_input" "input" for on Python version
import requests
import webbrowser
sites = ["http://www.bing.com/images/search"]
def openPage(x):
w = " "
if x == 1:
w = "bing img"
q = input(w + " search: ")
p = {"q": q}
r = requests.get(sites[x], params=p)
print("Status:", r.status_code)
webbrowser.open(r.url)
query = ''
while(query != 'iie'):
query = input("U. w .U enter 'b' for bing image search? ")
if query == "b":
openPage(1)
else:
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment