import urllib.request
from bs4 import BeautifulSoup
import re
def get_html(url):
responce = urllib.request.urlopen(url)
return responce.read()
def parser_html(html):
soup = BeautifulSoup(html, 'html.parser')
price_crypto = soup.find_all(id='quote_price')
#price_crypto = re.sub("\D", "", price_crypto)
print((price_crypto))
def main():
url = 'https://coinmarketcap.com/currencies/bitcoin/#charts'
parser_html(get_html(url))
if __name__ == '__main__':
main()
Как вытащить значение из data-usd="4049.18179296"