N
N
NyanChap2020-11-19 19:10:12
Python
NyanChap, 2020-11-19 19:10:12

It is necessary that when starting the telegram bot in python, the bitcoin rate is displayed, how to do this?

Who can help with a code or where to get specific information on RU

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sashka999, 2020-11-19
@NyanChap

Code parsing the price We put
two libraries

pip3 install requests
pip3 install pyquery

The code itself
import requests
from pyquery import PyQuery

r = requests.get("https://www.coindesk.com/price/bitcoin")
html = PyQuery(r.text)

price = html.find(".price-large").text()

print(price)

D
Dimonchik, 2020-11-19
@dimonchik2013

https://coinmarketcap.com/api/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question