topic description
as the following code, I finally want to print out soup
related codes
import requests
from bs4 import BeautifulSoup
def get_webpage(url):
html_page=requests.get(url)
if html_page.status_code!=200:
print("invalid url",html_page.status_code)
return None
else:
return html_page.text
site="https://tw.stock.yahoo.com/q/q?s=2377"
html=get_webpage(site)
soup=BeautifulSoup(html,"html.parser")
print(soup)
what result do you expect? What is the error message actually seen?
I expect him to release soup
but "Please press any renew." The phone told me that it didn"t show any content
problem description
I think there may be some blind spots, but I can"t find out
the environmental background of the problems and what methods you have tried
I am using visual studio 2017 Python application development, and have downloaded bs4