I am trying to scrape all match reports links from the page but there is 'load more' button, and I don't want to use selenium. Is there any solution to collect all links without selenium. Thanks in advance.
Here what I tried:
from bs4 import BeautifulSoup as bs
import requests
r=requests.get('https://www.iplt20.com/news/match-reports')
soup = bs(r.text,'lxml')
for match in soup.find_all('div',class_='latest-slider-wrap
position-relative'):
links = match.find('a')
print(links['href'])
Try:
Prints:
EDIT: To get all links you can use their Ajax pagination API:
Prints: