采集时,有时候需要采集图片,但某些网站的图片提供的相对地址,最好转换成绝对地址


在scrapy中有如下的解决策略

http://stackoverflow.com/questions/6499603/python-scrapy-convert-relative-paths-to-absolute-paths

http://stackoverflow.com/questions/19970015/scrapy-item-loader-to-get-a-absolute-url-from-extracted-url


用lxml中的转换方法,参考

http://qiita.com/podhmo/items/e03431c718b94d6304ff