While scraping some websites I was not able to get the output. For example:
from bs4 import BeautifulSoup
import requests
try:
source = requests.get('https://www.mcmaster.com/91251A051/')
source.raise_for_status()
soup = BeautifulSoup(source.text,'html.parser')
value = soup.find('table',class_='spec-table--pd')
print(value)
except Exception as e:
print(e)
In this program I am not able to get the output of the table values, tr tag, td tag... whereas if I print the soup I'm getting the output.