How to scrap a loading item in pyhton

42 Views Asked by At

I can't manage to scrape the dev github links on some coingecko's pages for it displays "loading" as output of the request. I've tried with request.get("https://www.coingecko.com/en/coins/solpatrol-bail")

Here the code:

import requests
from bs4 import BeautifulSoup

res=requests.get("https://www.coingecko.com/en/coins/solpatrol-bail#developer")
cres=BeautifulSoup(res.text,'html.parser')
dev=cres.find_all("div", attrs={"id":"developer"})
dev

If someone has any idea on how to solve this I would be grateful thanks!

1

There are 1 best solutions below

3
On

It appears that the developer tab is loaded from this url: https://www.coingecko.com/en/coins/25787/developer_tab. Which would make:

import requests
from bs4 import BeautifulSoup

res=requests.get("https://www.coingecko.com/en/coins/25787/developer_tab")
cres=BeautifulSoup(res.text,'html.parser')
dev=cres.find("a")['href']
dev

Output:

'https://github.com/SolPatrol/'