I am trying to web scrape tickers from the Yahoo Fiance website for crypto-currencies. However I can't tackle the pagination problem. I have tried to loop on the count and offset parameters in the url this way:
import requests
from bs4 import BeautifulSoup as bs
import pandas as pd
list_ticker=[]
for i in range(8):
url=f'https://finance.yahoo.com/cryptocurrencies?count=25&offset={i*25}'
r= requests.get(url)
soup=bs(r.text,"html.parser")
for i in range(25):
list_ticker.append(soup.find_all('a', {'class': 'Fw(600) C($linkColor)'})[i].text)
It does not work. Can I solve this problem using this library?
Thanks in advance!