But I have encounted a bit of a problem:
Expand|Select|Wrap|Line Numbers
- from urlparse import urlparse
- urls = open("/path/to/urls.txt", "r").readlines()
- for url in urls:
- addr = urlparse(url)
Expand|Select|Wrap|Line Numbers
- ParseResult(scheme='http', netloc='www.example.com', path='/path/to/file.php', params='', query='param1=value1¶m2=value2&parm3=value3', fragment='')
Expand|Select|Wrap|Line Numbers
- param1=value1¶m2=value2&parm3=value3
The problem is urlparse squishes both the parameter names and thier values into the same element in a list, so its not so easy to automate replacing the parameter values with a string, while keeping the names the same. Anyone know how I can do this? I would appreciate any help on this, thank you.