search in a web using python 3.5 -


i want make code can input text in web; i.e. in web page http://www.dictionary.com/ word. code found following (i'm using python 3.5):

import urllib.request import urllib.parse  value= {'q', 'something'} value= urllib.parse.urlencode(value) value= value.encode('utf-8') f= urllib.request.request('http://www.dictionary.com/', value) g= urllib.request.urlopen(f) print(g.geturl()) 

however, print(g.geturl()) prints http://www.dictionary.com/, same link had @ beginning. want search 'something' in search bar.

geturl() returns url of page, need use read() function.

print(g.read()) 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -