Last active
December 13, 2023 09:24
-
-
Save Sarverott/08403918c5f2aeee973a9750fd6f12c2 to your computer and use it in GitHub Desktop.
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
# this snippet makes http request to website with random sentence generator | |
# special thanks for hard work to the creators of "https://randomword.com" - these sentences are great! | |
from bs4 import BeautifulSoup | |
import requests | |
exitflag = False | |
while not exitflag: | |
website = requests.get( "https://randomword.com/sentence" ) | |
infosoup = BeautifulSoup( randomMessageWebpage.content, 'html.parser' ) | |
print() | |
print( infosoup.find( id="random_word" ).string ) | |
print() | |
exitflag = input("type EXIT to leave~> ").lower() != "exit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment