[英]How to add data to the firebase firestore by generating different document id after hitting submit button again and again? Android Kotlin
[英]Different data after scraping with python and bs4
我正在嘗試獲取亞馬遜上的評論數量。 但是,當我獲取數據時,它與網站上的數據不同。 (131 是在抓取之后,655 來自亞馬遜)我附上頁面截圖和抓取之后的截圖。
import bs4
import requests
import time
url3 = "https://www.amazon.it/dp/B076S8NSCD"
headers = {"User-Agent" : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15'}
res = requests.get(url3, headers = headers)
soup = bs4.BeautifulSoup(res.text, "html.parser")
reviews = soup.find(id = "acrCustomerReviewText").get_text()
print(reviews)
如果您沒有使用高級輪換住宅代理來抓取亞馬遜評論,那么這很可能是一種偽裝措施,您的 IP 被標記為發送過多請求。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.