In [53]: f=furl('http://www.baidu.com')
In [54]: f.fragment.pathsegments=['two','directories']
f.fragment f.fragmentstr
In [55]: f.fragment.args={"one":'argument'}In [56]: f.url
Out[56]: 'http://www.baidu.com#one=argument'In [57]:
1
2
3
4
5
6
7
8
9
10
11
12
或者使用这种形式
f = furl('http://www.google.com/search?q=query#1')
f.copy().remove(path=True).set(host='taco.com').join('/pumps.html').add(fragment_path='party').url
'http://taco.com/pumps.html#party'