I am working with Python + Sellenium + BeautifulSoup4 using below code but unable to open website (https://check.spamhaus.org/) and scrape over it.
My code is:
import requests
from bs4 import BeautifulSoup
url = "https://check.spamhaus.org/"
r = requests.get(url)
htmlContent = r.content
soup = BeautifulSoup(htmlContent, 'html.parser')
print(soup.prettify)
Please help in informing the GAP.
I included some of the information from @Nic's answer and used
find_element_by_id(id)
andfind_element_by_name(name)
and things started working for me. Also, indriver.switch_to.window
function I changed the index number to 1.Here is my code: