Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import urllib
- query_args = {'q': 'query string', 'foo': 'bar'}
- encoded_args = urllib.urlencode(query_args)
- print 'Encoded:', encoded_args
- url = 'http://localhost:8080/?' + encoded_args
- print urllib.urlopen(url).read()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement