I am trying to write some code that will give me the price in BTC when I run it. Although I am not getting an error after running the code, I am not getting the price and I am getting NONE. Can anyone look at my code and figure out what the problem is? Here is the code below:
import requests
from bs4 import BeautifulSoup
page = requests.get("https://www.coinbase.com/charts")
soup = BeautifulSoup(page.content, 'html.parser')
seven_day = soup.find(id="seven-day-forecast")
bitcoin = soup.find('pre',{'style':'word-wrap: break-word; white-space: pre-
wrap;'})
print(bitcoin)
Thanks a lot!