So now the script send me a photo
This commit is contained in:
parent
74da1235b4
commit
931cf9975e
5
app.py
5
app.py
|
@ -36,11 +36,6 @@ def orario():
|
|||
number = str(range(0,7))
|
||||
day = str(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"])
|
||||
return render_template('orario/orario.html', data=dict, number=number, day=day)
|
||||
|
||||
@app.route('/calendario')
|
||||
def calendario():
|
||||
logging.info("A user went up: Calendario")
|
||||
return render_template('html/calendario.html')
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.info("Web server started!")
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 125 KiB |
|
@ -1,5 +1,9 @@
|
|||
from selenium.webdriver.firefox.options import Options # Selenium
|
||||
from selenium import webdriver # Selenium
|
||||
from dotenv import load_dotenv
|
||||
from twilio.rest import Client
|
||||
import time
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
load_dotenv()
|
||||
|
@ -10,6 +14,11 @@ PHONE_NUMBER_PERSONAL = os.getenv('PHONE_NUMBER_PERSONAL')
|
|||
|
||||
client = Client(SID, AUTH_TOKEN)
|
||||
|
||||
message = client.messages.create(to=PHONE_NUMBER_PERSONAL,
|
||||
from_=PHONE_NUMBER_BOT,
|
||||
body="Hello from Python!")
|
||||
message = client.messages \
|
||||
.create(
|
||||
body="Test",
|
||||
media_url=['IMAGE URL'],
|
||||
from_=PHONE_NUMBER_BOT,
|
||||
to=PHONE_NUMBER_PERSONAL
|
||||
)
|
||||
print(message.sid)
|
Loading…
Reference in New Issue