-
-
Save elvisoliveira/56d92e1bf679df4ea2b78fb2d5adf7aa to your computer and use it in GitHub Desktop.
Prints daily text + explanation to stdout
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 requests | |
| from bs4 import BeautifulSoup | |
| url = 'https://wol.jw.org/en/wol/h/r1/lp-e' | |
| response = requests.get(url) | |
| html_content = response.content | |
| soup = BeautifulSoup(html_content, 'html.parser') | |
| daily_text = soup.find(class_='themeScrp').get_text(strip=True) | |
| explanation = soup.find(class_='bodyTxt').get_text(strip=True) | |
| print(daily_text) | |
| print(explanation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment