Passing parameters in url using python scripting -
my need : want pass payload in each parameter , result stored in text file. want know how pass payload parameters in url using python
fyi : pulling url text file , writing output text file.
need pass parameter in between = &
i recommend using urllib
handle encodings well. building off of arshid’s example:
import urllib url = 'http://example.com' params = { 'var1': 'test', 'name': 'arshid' } url = '%s?%s' % (url, urllib.urlencode(params),)
you can see examples here more info.
Comments
Post a Comment