Aug-18-2021, 02:58 AM
I would like to create a program to check for updates on a regular basis.
In the "VMware ESXi" release notes, the version is in a table (i.e., in a <td> tag).
To do this, I want to scrape from urllib and then use BeautifulSoup to filter the information in the <td> tag,
so I wrote the following code, but it returned "None".
In the "VMware ESXi" release notes, the version is in a table (i.e., in a <td> tag).
To do this, I want to scrape from urllib and then use BeautifulSoup to filter the information in the <td> tag,
so I wrote the following code, but it returned "None".
import urllib.request, urllib.error, urllib.parse, re
from bs4 import BeautifulSoup
import binascii
header = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36'}
#Spoofing
root = 'https://kb.vmware.com/s/article/2143832'
url = urllib.request.Request(root,headers=header)
response = urllib.request.urlopen(url).read().decode('utf-8')
soup = BeautifulSoup(response)
corn_soup = soup.find('td')
print(corn_soup)I think I'm accessing the site correctly, but I don't think I'm getting the information I need in the soup.
