tried following the same method, didnt work out

import bs4
import requests
from bs4 import BeautifulSoup
import urllib.request

#data I want to pull then push a while loop to get it regularly by the minute
r = requests.get('https://finance.yahoo.com/quote/MSFT?p=MSFT&.tsrc=fin-srch') 
soup = BeautifulSoup(r.text, 'xml')
print(soup)
1

There are 1 best solutions below

0
Gokhan Atil On

Please check the documentation:

https://www.crummy.com/software/BeautifulSoup/bs4/doc/

You need to call a function of soup object. For example:

print(soup.get_text())