2023-04-23 11:47:16 +00:00
|
|
|
import requests
|
|
|
|
from bs4 import BeautifulSoup
|
|
|
|
from common import get_api
|
|
|
|
|
|
|
|
# Get the quote of the day
|
2024-12-03 23:35:21 +00:00
|
|
|
r = requests.get('https://proverbia.net/frase-del-dia', verify=False)
|
2023-04-23 11:47:16 +00:00
|
|
|
content = BeautifulSoup(r.text, "html.parser").find_all('blockquote')
|
|
|
|
message = content[0].p.get_text() + "\n\n"
|
|
|
|
message += "—" + content[0].a.get_text() + " " + content[0].em.get_text()
|
|
|
|
|
|
|
|
api = get_api('masto.es', 'citabot')
|
|
|
|
api.status_post(message)
|