I am trying to develop a python software for extracting prices by web scraping from these sites:
https://p2p.binance.com/es/trade/all-payments/USDT?fiat=ARS
https://www.kucoin.com/es/otc/buy/USDT-ARS
I used as a guide a simple youtube tutorial where they use the extension "beautiful soup" to scrape data.
They use a code like this to extract the data in the first place:
import requests
import pandas as pd
url='https://resultados.as.com/resultados/futbol/primera/2021_2022/'
page=requests.get(url)
soup=BeautifulSoup(page.content,'html.parser')
#Equipos
count=0
eq=soup.find_all('a', class_='nombre-equipo')
equipos=list()
for i in eq:
if count<20:
equipos.append(i.text)
else:
break
count+=1
In this example, you simply need to set the Web page where the data will be scraped from (url) and the data location (soup.find_all(xxxxxxx)).
I did that with both urls from binance and kucoin, and inspected the pages to obtain the corrects data classes:
with this example, line eq=soup.find_all('a', class_='nombre-equipo')
, should be:
eq=soup.find_all('div', class_='css-1m1f8hn')
But I can´t make it to scrape any data. Do you have any idea, or maybe some other web scraper to use?