from urlparse import urljoin
urljoin("http://www.asite.com/folder/currentpage.html", "anotherpage.html")
'http://www.asite.com/folder/anotherpage.html'
urljoin("http://www.asite.com/folder/currentpage.html", "folder2/anotherpage.html")
'http://www.asite.com/folder/folder2/anotherpage.html'
urljoin("http://www.asite.com/folder/currentpage.html", "/folder3/anotherpage.html")
'http://www.asite.com/folder3/anotherpage.html'
urljoin("http://www.asite.com/folder/currentpage.html", "../finalpage.html")
'http://www.asite.com/finalpage.html'

最新文章

  1. (转载)H.264码流的RTP封包说明
  2. Javascript模块化规范
  3. AnyCAD.NET C#开发CAD软件实践(一)
  4. JavaScript依赖注入的实现思路
  5. 利用RxJava获取手机已安装的App的图片、应用名称和版本号
  6. C#基础精华----枚举
  7. 暑假集训(2)第一弹 -----Is It A Tree?(Poj308)
  8. thinkphp中神奇的create()方法
  9. JavaScript DOM编程艺术-学习笔记(第十章、第十一章)
  10. EM算法--第一篇
  11. linux 脚本保留日志
  12. nginx负载均衡(一)
  13. MVC配置伪静态
  14. python 3 ---购物车练习
  15. 魔术常量(Magic constants)
  16. raid5 阵列硬盘离线数据恢复成功案例
  17. EL和 JSTL? 在JSP中简化 java代码的写法!
  18. 用ab的post方式进行测试
  19. 使用requests库提交multipart/form-data 格式的请求
  20. 修改BlackLowKey皮肤样式,增加占屏比

热门文章

  1. Inception系列
  2. Mr Cao 的提问
  3. Ajax棵
  4. linux make configure make
  5. vue数据双向绑定原理
  6. Perl中的哈希(四)
  7. unity Texture贴图纹理及相关属性
  8. Yosemite安装libv8和therubyracer
  9. BP神经网络原理详解
  10. SpringMVC+Spring+Mybatis+Maven+mysql整合