I want to scrape a site with python and BeautifulSoup
but I can't find the page number and I can scrape only the first page of the site, I think this site used Ajax and when I change the page the URL address doesn't change.
It's the link of the site:
https://ihome.ir/sell-residential-apartment/th-tehran
And this is my code, I want to scrape 20 pages of this site, scrape houses with their details like prices, foundation, etc
import requests
from bs4 import BeautifulSoup
response = requests.get("https://ihome.ir/sell-residential-apartment/th-tehran")
soup = BeautifulSoup(response.json(), "html.parser")
prices = soup.select('.sell-value')
titles = soup.select('.title')
homes_prices = []
for home in prices:
homes_prices.append(int(''.join(filter(str.isdigit, home.getText()))))
homes_titles = []
for title in titles:
homes_titles.append(title.getText())
res = dict(zip(homes_titles, homes_prices))
for key, value in res.items():
p = str(res[key])
if len(str(res[key])) <= 2:
p += '000000000'
if len(str(res[key])) > 2:
p += '000000'
print(key.strip(), int(p))