作者il0306 (Taylor)
看板R_Language
标题[问题] 爬虫问题
时间Tue Nov 10 10:40:44 2020
[问题类型]:
爬虫爬不出来
[软体熟悉度]:
R爬虫新手
[问题叙述]:
想将网站上的文字和数字抓下
https://i.imgur.com/3WRTVVA.jpg
安全不能等之类的文字我抓的到
但就地区和数值抓不下来
都回覆空质
[程式范例]:
url_list = '
https://168.motc.gov.tw/countrydeadhurt/%E8%87%BA%E5%8C%97%E5%B8%8
2?y=100&m=1'
temp = read_html(url_list)
temp %>% html_nodes(xpath = '//*[@id="areaList"]/div')
[环境叙述]:
[关键字]:
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 223.137.54.124 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/R_Language/M.1604976046.A.306.html
※ 编辑: il0306 (223.137.54.124 台湾), 11/10/2020 10:59:42
※ 编辑: il0306 (223.137.54.124 台湾), 11/10/2020 11:04:22
1F:→ andrew43: 动态生成的。temp就已经没有抓到了。试试rselenium 11/10 17:03
2F:→ obarisk: 在 script 里, html_node("script") grep 清一下再解json 11/11 20:17