Last active
September 28, 2019 18:05
-
-
Save pythonpaul/01d04fe5f55c96f0ef093131ab4b7aca to your computer and use it in GitHub Desktop.
"raw_input" "input" for on Python version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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