【发布时间】:2019-06-28 13:27:44
【问题描述】:
我们有这个网址: https://www.aliexpress.com/store/feedback-score/1665279.html
所需的内容是“反馈历史”表,它位于 iframe 内:
Feedback 1 Month 3 Months 6 Months
Positive (4-5 Stars) 154 562 1,550
Neutral (3 Stars) 8 19 65
Negative (1-2 Stars) 8 20 57
Positive feedback rate 95.1% 96.6% 96.5%
我们如何提取它?
【问题讨论】:
-
我认为您很可能需要模拟浏览器,例如
selenium并使用selenium.switch_to.frame(),因为 iframe 的内容不会在请求中加载,并且指向该 iframe 的链接很可能不会除非会话保持,否则工作。
标签: python web-scraping beautifulsoup