1分钟轻松爬数据(web scraper插件使用教程)
前提你已安装web scraper(Google,FireBox商店都有)。
说明:安装后右键查看元素或检查即可看到web scraper,简介如图.
刚开始只能点第一个(显示你自己建的要爬的所有网站)和第三个(可以创建或导入)
(导入可以查看网站http://www.iwebscraper.com/category/%e6%a8%a1%e6%9d%bf/)
-
建一个sitemap
-
建好后点击你建的sitemap就可以创建你要抓去的数据了
3. 这个时候创建一个获取所有元素。
选择元素
后面就可以创建需要的数据了。我只写一个
这就完了。
最简单就是导入
例子
{"_id":"keepallcourses","startUrl":["https://www.gotokeep.com/all_courses/"],"selectors":[{"id":"element","type":"SelectorElementScroll","parentSelectors":["_root"],"selector":"li","multiple":true,"delay":"2000"},{"id":"name","type":"SelectorText","parentSelectors":["element"],"selector":"div.name","multiple":false,"regex":"","delay":0},{"id":"classnumber","type":"SelectorText","parentSelectors":["element"],"selector":"span:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"bodypart","type":"SelectorText","parentSelectors":["element"],"selector":"span:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"difficult","type":"SelectorText","parentSelectors":["element"],"selector":"div.level","multiple":false,"regex":"","delay":0},{"id":"apparatus","type":"SelectorText","parentSelectors":["element"],"selector":"div.equipment","multiple":false,"regex":"","delay":0},{"id":"trainnumber","type":"SelectorText","parentSelectors":["element"],"selector":"div.pioneer","multiple":false,"regex":"","delay":0}]}
》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》
第一次写就这这样吧!
有关webscraper的问题,看这个就够了https://www.jianshu.com/p/cd5124ac0871
web scraper 抓取分页数据和二级页面内容https://www.cnblogs.com/fengzheng/p/9328481.html