我试图从magicbricks.com网站 但当我试图通过手动单击页面底部的第二个页面来更改页面时,页面链接保持不变。我得到了同样的数据。如何加载剩余页面。在
例如: 这是第一页的链接。在
第二页的链接是相同的只有页面内容的改变
import pandas as pd
from pandas import ExcelWriter
import requests,re,csv
from bs4 import BeautifulSoup
for i in range(1,5): # Number of pages plus one
url = "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".format(i);
r = requests.get(url)
soup = BeautifulSoup(r.content)
我想删除这个网站的500个条目
目前没有回答
相关问题 更多 >
编程相关推荐