This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
url = "http://yourwebsitehere.com/" | |
response = requests.get(url) | |
soup = BeautifulSoup(response.text, "html.parser") | |
email = soup.select('a[href^=mailto]') | |
with open("website_emails.csv", "a") as csv_file: | |
csv_writer = writer(csv_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
import datetime | |
while True: | |
r = requests.get("https://thinktreeit.com") | |
if r.status_code != 200: | |
print(f'Down Status Code:{r.status_code} {datetime.datetime.now()}') | |
time.sleep(5) | |
else: |
NewerOlder