Am trying to scrape information about 2020 THE WORLD'S HIGHEST-PAID ATHLETES EARNINGS through this link https://www.forbes.com/profile/roger-federer/?list=athletes Here is the code for the first page
import requests
from bs4 import BeautifulSoup
import csv
page = requests.get('https://www.forbes.com/profile/roger-federer/?list=athletes')
soup = BeautifulSoup(page.text, 'html.parser')
profile = soup.find(class_ = 'profile-content')
name = soup.find(class_='profile-heading__rank').next_sibling
value = profile.find(class_ = "profile-info__item-value").get_text()
stats = profile.find_all(class_ = "profile-stats__text")
age = stats[0].get_text()
sport = stats[1].get_text()
citizenship = stats[5].get_text()
photo = profile.find(class_ = "profile-photo")
image = photo.find("img")
source=image.get("src")
print(name+" " +" "+ value+" "+ source+" "+age+" "+sport+" "+citizenship)
How can i get the details for the remaining 99 athletes through pagination by clicking next