magibricks.com的废品数据

时间:2018-08-22 04:46:30

标签: python web-scraping beautifulsoup

我正在尝试从magicbricks.com抓取数据 但是,当我尝试通过手动单击页面底部的第二页来更改页面时,页面链接保持不变。而且我得到相同的数据。我如何加载其余页面。

例如: 这是首页的链接。

https://www.magicbricks.com/property-for-sale/residential-real-estate?bedroom=1,2,3,4,5,%3E5&proptype=Multistorey-Apartment,Builder-Floor-Apartment,Penthouse,Studio-Apartment,Residential-House,Villa,Residential-Plot&cityName=Mumbai

第二页的链接仅是页面更改的内容

https://www.magicbricks.com/property-for-sale/residential-real-estate?bedroom=1,2,3,4,5,%3E5&proptype=Multistorey-Apartment,Builder-Floor-Apartment,Penthouse,Studio-Apartment,Residential-House,Villa,Residential-Plot&cityName=Mumbai

NavigationView

我要删除该网站的500个条目

1 个答案:

答案 0 :(得分:-1)

尝试为此使用硒 browser.execute_script("window.scrollTo(0, document.body.scrollHeight);") 和这段代码滚动