Created
July 2, 2021 21:32
-
-
Save ShyftXero/32ada3043e268271f92e1046b8992204 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 os | |
from time import sleep | |
# try: | |
# my_animals_file = open('other_animals.txt', 'r') | |
# for line in my_animals_file.readlines(): | |
# print(line.strip() ) | |
# my_animals_file.close()yword found in text | |
# except FileNotFoundError: | |
# print("the file was not found") | |
# exit() | |
# some_new_file = open("more_animals.txt", "w") | |
# some_new_file.write("yak, bison, \nwren") | |
# some_new_file.close() | |
# print('wait 3.5 seconds') | |
# sleep(3.5) | |
# print(os.listdir("tools")) | |
import requests | |
while True: | |
data = requests.get("https://msn.com") | |
# print(data.text) | |
if "hacker" in data.text: | |
print("hackers are in the news") | |
else: | |
print('hackers are not in the news') | |
print('waiting 5 min...') | |
sleep(3) | |
print('done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment