I am trying to web scrape a web page. However, the website itself does not allow a right click functionality to inspect the element or page source. In addition, when I print the parsed html text, the result only has body tags and does not show the information inside the body tags.
from selenium import webdriver
import bs4 as bs
import urllib.request
driver = webdriver.Chrome(executable_path=r'PATH')
driver.get("website.com")
assert "Title" in driver.title
sauce = urllib.request.urlopen('website.com').read()
soup = bs.BeautifulSoup(sauce, 'html.parser')
print(soup)
I expect to get the actual HTML (specifically HTML between the body tags) from the soup; however, I only get
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>Title</title>
</head>
<body></body>
</html>
I am relatively new to webscraping; however, I never had this problem before. Is it specific to the site? When I use a chrome extension, I am able to allow for right clicking, and only then, can I inspect the page source (and there is HTML and tags within the body tags).