2006年06月15日 星期四 00:13
该死的GWF,又只能用洋葱才能进来Gmail了, 用SGMLParser分析出来的,url大都是相对地址,自己写了个补全,不是很理想咯,谁有代码借我研究一个咯 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060615/ead42574/attachment.html
2006年06月15日 星期四 01:12
相对地址加上员页面地址就是绝对地址了吧 试试urlparse.urljoin In [1]: from urlparse import urljoin In [2]: urljoin('http://some.base.url/test.html','spam/egg/g.html') Out[2]: 'http://some.base.url/spam/egg/g.html' In [3]: On 6/15/06, l zh <lzhlds at gmail.com> wrote: > 该死的GWF,又只能用洋葱才能进来Gmail了, > 用SGMLParser分析出来的,url大都是相对地址,自己写了个补全,不是很理想咯,谁有代码借我研究一个咯 > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to > python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > >
2006年06月15日 星期四 09:39
原来还有这种方法,urlparse.urljoin,我去看看帮助 在06-6-15,imcs ee <imcsee at gmail.com> 写道: > > 相对地址加上员页面地址就是绝对地址了吧 > 试试urlparse.urljoin > In [1]: from urlparse import urljoin > > In [2]: urljoin('http://some.base.url/test.html','spam/egg/g.html') > Out[2]: 'http://some.base.url/spam/egg/g.html' > > In [3]: > > > > On 6/15/06, l zh <lzhlds at gmail.com> wrote: > > 该死的GWF,又只能用洋葱才能进来Gmail了, > > 用SGMLParser分析出来的,url大都是相对地址,自己写了个补全,不是很理想咯,谁有代码借我研究一个咯 > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request at lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060615/c6b9c443/attachment.htm
Zeuux © 2025
京ICP备05028076号