我试图为所有7页评论卷曲这个网址,然后将评论存储在一个文本文件中: https://www.amazon.com/Ferrero-Rocher-Hazelnut-Chocolates-Count/product-reviews/B0042TVKZY/ref=cm_cr_getr_d_paging_btm_7?ie=UTF8&filterByStar=three_star&reviewerType=avp_only_reviews&pageNumber=7#reviews-filter-bar
这是我到目前为止所做的:
#!/bin/bash
for i in {1..7}
do
URL=$(curl "https://www.amazon.com/Ferrero-Rocher-Hazelnut-Chocolates-Count/product-reviews/B0042TVKZY/ref=cm_cr_getr_d_paging_btm_7?ie=UTF8&filterByStar=three_star&reviewerType=avp_only_reviews&pageNumber=3D${i}#reviews-filter-bar")
RETURN=$(echo $URL)
curl $RETURN >reviews${i}.text
done