开发者

which function of mechanize is equal with urllib.urlencode

开发者 https://www.devze.com 2023-03-04 13:20 出处:网络
urllib.urlencode could encode url\'s params开发者_高级运维.It seems no likely function in Mechanize.

urllib.urlencode could encode url's params开发者_高级运维. It seems no likely function in Mechanize.

So, I have to use urllib and Mechanize, because I only need urlencode.

Any function could implement the same task like urllib.urlencode in Mechanize


Why would mechanize have it? It's already in urllib, which comes with Python.


mechanize actually uses urllib and urllib2 for most tasks that involve urls.

Since this functionality already exists in urllib/2 (as mentioned by Ignacio Vazquez-Abrams) there's no need for it to be implemented elsewhere. When coding you import all the libraries that have functionality you need to use.

0

精彩评论

暂无评论...
验证码 换一张
取 消