I want to get data from https://www.cvedetails.com/vulnerability-list/vendor_id-26/product_id-32238/Microsoft-Windows-10.html from page 1 to the last page while it is sorted by "CVE Number Ascending" The data I want to retrieve in CSV format is everything in the table header and the table data
I have been trying out a few codes but it doesn't seem to work and I'm kind of desperate now
the place I try to learn from
Any help would be appreciated
I asked this once before The replies I got were great But it doesn't seem to get what I need and I am confused about how this works And more so because of how weird the sources code for the website is
#!/usr/bin/env python3
import bs4 # Good HTML parser
from urllib.request import urlopen as uReq # Helps with opening URL
from bs4 import BeautifulSoup as soup
# The target URL
my_url = 'https://www.cvedetails.com/vulnerability-list.php?vendor_id=26&product_id=32238&version_id=&page=1&hasexp=0&opdos=0&opec=0&opov=0&opcsrf=0&opgpriv=0&opsqli=0&opxss=0&opdirt=0&opmemc=0&ophttprs=0&opbyp=0&opfileinc=0&opginf=0&cvssscoremin=0&cvssscoremax=0&year=0&month=0&cweid=0&order=2&trc=851&sha=41e451b72c2e412c0a1cb8cb1dcfee3d16d51c44'
# Check process
# print(my_url)
# Open a connection and grab the webpage and downloads it
uClient = uReq(my_url)
# Save the webpage into a variable
page_html = uClient.read()
# Close the internet connection from uclient
uClient.close()
# Calling soup to parse the html with html parser and saving it to a variable
page_soup = soup(page_html,"html.parser")
print(page_soup.h1)
This is the error code
Traceback (most recent call last):
File "./Testing3.py", line 21, in <module>
uClient = uReq(my_url)
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden