利用urljoin快速将url补全
Lan
2020-03-01 15:58
45 人阅读
0 条评论
如采集的url只有后一半如
./target/000001.html
./target/000002.html
./target/000003.html
./target/000004.html
from urllib import parse
houzhui = './target/000004.html'
url = 'http://pycs.greedyai.com/'
url = parse.urljoin(url,houzhui)
赞赏
![打赏二维码](https://i-blog.csdnimg.cn/blog_migrate/3a584bda34e1671c4a5d6ebe99b9718e.png)