I was trying to apply what others have suggested from here:
Beautiful Soup: Accessing <li> elements from <ul> with no id
But I can't get it to work. It seems the person from that question had a
'parent' h2
header, but the one I am trying to parse does not.
Here is the webpage I am scraping:
(I think) I located the element I need to manipulate, it's <ul id="latestVulns">
and its following li
sections.
I basically want to scrape for the section that says "Last 20 Scored Vulnerability IDs & Summaries" and based off of what the vulnerabilities are, send an email to the appropriate department of my work place.
Here is my code so far:
from bs4 import BeautifulSoup
import requests
source = requests.get('https://nvd.nist.gov/')
soup = BeautifulSoup(source.content, 'lxml')
section = soup.find('latestVulns')
print(section)
this code returns None
I'm at a loss