我试图抓取 sainsburys.co.uk,我正在 R 中运行下一个代码
doc <- htmlTreeParse('http://www.sainsburys.co.uk/shop/gb/groceries/fruit-veg/all-fruit#langId=44&storeId=10151&catalogId=10122&categoryId=12545&parent_category_rn=12518&top_category=12518&pageSize=30&orderBy=FAVOURITES_FIRST&searchTerm')
rootNode <- xmlRoot(doc)
但我有这个错误:
Error in x$children[[1]] : subscript out of bounds
我究竟做错了什么?