Trying to open a URL link and read the data in it. The URL link itself is valid but once it is put into the urlopen function it returns a "404 not found" error. Please help. Thank you! Code below.
from bs4 import BeautifulSoup
import urllib.request as ur
# Enter a stock symbol
index = "MSFT"
# URL link
url_is = "https://finance.yahoo.com/quote/" + index + "/financials?p=" + index
url_bs = "https://finance.yahoo.com/quote/" + index + "/balance-sheet?p=" + index
url_cf = "https://finance.yahoo.com/quote/" + index + "/cash-flow?p=" + index
read_data = ur.urlopen(url_is).read()
soup_is= BeautifulSoup(read_data, "lxml")