抓取页面上图片
百度图片 对于这样的页面怎么抓取其图片
------解决方案--------------------读取整个页面内容,然后通过正则匹配 图片标签
------解决方案--------------------好多写在js里面呢
------解决方案-------------------- var data = [
{
"width": 142,
"height": 142,
"src": "http:\/\/img2.bdstatic.com\/img\/image\/2147dd98d1001e939011363f01179ec54e736d196bf.jpg",
// "url": "/channel?c=%E5%8A%A8%E6%BC%AB&t=%E5%A6%96%E7%B2%BE%E7%9A%84%E5%B0%BE%E5%B7%B4&s=0",
"url": "/channel?fm=index&image_id=2245940484&c=%E5%8A%A8%E6%BC%AB&t=%E5%A6%96%E7%B2%BE%E7%9A%84%E5%B0%BE%E5%B7%B4&s=0",
"image_id": "2245940484",
"title": "妖精的尾巴",
"col": "动漫",
"tag3": ""
}
, {
"width": 142,
"height": 287,
"src": "http:\/\/imgstatic.baidu.com\/img\/image\/huoying0207.jpg",
// "url": "/channel?c=动漫&t=火影忍者&s=0",
"url": "/channel?fm=index&image_id=9562649313&c=动漫&t=火影忍者&s=0",
"image_id": "9562649313",
"title": "火影忍者",
"col": "动漫",
"tag3": ""
}
------解决方案--------------------也没问题呀,你读取整个页面;看下js里面的格式,再用正则匹配。一样的
------解决方案--------------------正则就可以了;下班呢