我试图解析这个网页上的描述“享受创造和控制的力量…”:https://www.origin.com/zaf/en-us/store/the-sims/the-sims-4。你知道吗
当我用Beautifulsoup解析页面时,页面源代码不包含描述,我也不知道为什么。你知道吗
handle = 'sims 4'
query = handle + " origin.com" # enter query to search
print(query)
for topresult in search(query, tld="com", lang='en', num=10, stop=1, pause=2):
print('Query Successful:' + handle)
page = requests.get(topresult)
soup = BeautifulSoup(page, 'html.parser')
print(soup)
任何帮助都将不胜感激。我已经想了好几天了。我也尝试过使用Selenium和Chrome驱动程序,但得到了类似的结果。你知道吗
请求和BeautifulSoup对此不起作用,因为页面是用javascript动态加载的。这就是为什么你找不到描述。SeleniumWebDriver应该可以正常工作。我写了一些代码来获取描述。你知道吗
相关问题 更多 >
编程相关推荐