我正在使用Beautiful Soup从非英语网站中提取数据。现在我的代码只从关键字搜索中提取前十个结果。该网站旨在通过“更多”按钮访问其他结果(有点像无限滚动,但您必须继续点击更多才能获得下一组结果)。当我点击“更多”时,URL 不会改变,所以我不能每次都迭代不同的 URL。
我真的很想在两件事上得到一些帮助。
我正在添加“更多”按钮外观的照片,因为它不是英文的。它在页面末尾以蓝色文本显示。

import requests, csv, os
from bs4 import BeautifulSoup
from time import strftime, sleep
# make a GET request (requests.get("URL")) and store the response in a response object (req)
responsePA = requests.get('https://www.prothomalo.com/search?q=%E0%A6%A7%E0%A6%B0%E0%A7%8D%E0%A6%B7%E0%A6%A3')
# read the content of the server’s response
rawPagePA = responsePA.text
soupPA = BeautifulSoup(rawPagePA)
# take a look
print (soupPA.prettify())
urlsPA = [] #creating empty list to store URLs
for item in soupPA.find_all("div", …Run Code Online (Sandbox Code Playgroud) python beautifulsoup web-scraping python-3.x infinite-scroll