Look at content you get back,eg
Usually when a site use a lot of Javascript can use Selenium
As this is just a simple test of a server that not may be needed for this task,can bypass it be passing in the
print(soup)
.<noscript>This ' 'site requires Javascript to work,.....So i don't know if just test this on a server(that make this more difficult) that may not be needed for this this task.
Usually when a site use a lot of Javascript can use Selenium
As this is just a simple test of a server that not may be needed for this task,can bypass it be passing in the
cookie
.from bs4 import BeautifulSoup from requests import get page = "http://py123.epizy.com/index.html" headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} cookies = {'__test': '1bb6e881021f013463740eeb74840b18'} content = get(page, headers=headers, cookies=cookies).content soup = BeautifulSoup(content, "lxml") table_info = soup.select_one('.table-info') mail = table_info.select_one('.col-2 a') mail = mail.get('href') mail_clean = mail.split(':')[1] print(mail_clean)
Output:[email protected]