I am new to this world of webscraping and its libraries. I wanted to extract certain information from a website, but cannot find the text that I am looking for. This is the website: "https://webgate.ec.europa.eu/rasff-window/screen/notification/486901".
I want to extract information like Product, Product category, reference, subject etc from the website and put it into a dataframe.
The approach that I took was to use the requests and Beatifulsoup library to extract text as suggested in many articles. This is the code that I am using:
from bs4 import BeautifulSoup
import requests
url = 'https://webgate.ec.europa.eu/rasff-window/screen/notification/486901'
res = requests.get(url)
html_page = res.content
soup = BeautifulSoup(html_page, 'html.parser')
text = soup.find_all(text=True)
But when I type text to find out what is inside it, I get something like this:
text
['\n',
'doctype html',
'\n',
'\n',
'\n',
'\n',
'RASFF WINDOW',
'\n',
'\n',
'\n',
'\n',
' FOR OPEN ID IMPLEMENTATION\n\n <script type="text/javascript" src="/rasff-
window/assets/jsrsasign-all-min.js"></script>\n <script type="text/javascript" src="/rasff-
window/assets/oidc-client.min.js"></script>\n <script type="text/javascript" src="/rasff-
.
.]
When I use the inspect element I see there is the information I want present in the page but not getting displayed in my text. Also if you check the information is not inside any dynamic javascript, but somehow it is not getting extracted as text.
What should I do in this case, I need to extract information from similar pages(1000's) that's why I was thinking of not using selenium to do the work. Any suggestions or reading is highly appreciated.