Issue
I just get ouput as below however looking for CVE-2022-1285
CVE-2022-1285 None
url ='https://nvd.nist.gov/vuln/full-listing/2022/6'
response = requests.get(url)
soup = bs(response.text,'html.parser')
for cve in soup.find_all('span',class_='col-md-2'):
print(cve.text, cve.get('href'))
Solution
Instead of trying to extract the link from the span
element, you can grab the a
tag` and use the same method. For example:
url ='https://nvd.nist.gov/vuln/full-listing/2022/6'
response = requests.get(url)
soup = bs(response.text,'html.parser')
for cve in soup.find_all('span',class_='col-md-2'):
print(cve.text, cve.a.get('href'))
# link = cve.a.get('href')
# print(link)
Answered By - alexpdev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.