前提你已安装web scraper(Google,FireBox商店都有)。
说明:安装后右键查看元素或检查即可看到web scraper,简介如图.
刚开始只能点第一个(显示你自己建的要爬的所有网站)和第三个(可以创建或导入)
(导入可以查看网站http://www.iwebscraper.com/category/%e6%a8%a1%e6%9d%bf/)
{"_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