在百度上找的,以后忘了再看. 语法如下: var obj = parseQuery(query) query是被解析的查询参数,函数返回解析后的对象. 使用范例如下: var jerry = parseQuery("name=jerry&age=1"); jerry; 返回值:{name: " jerry ", age: "1"},返回类型Object var tom = parseQuery("name= tom &a…
import re import urllib url="http://www.itokit.com" s=urllib.urlopen(url).read() ss=s.replace(" ","") urls=re.findall(r"<a.*?href=.*?<\/a>",ss,re.I) for i in urls: print i else: print 'this is over' 挺好用的,记录…