13/11/2017, 15:54
Salve ho questo script in bash lo vorrei trasformare in python è possibile farlo?
grazie
grazie
Codice:
#!/bin/sh
SnapFile="/var/tmp/snapshot.jpg"
wget -O $SnapFile "http://xxx.xxx.x.xxx:81/snapshot.cgi?loginuse=xxxxxxxx&loginpas=xxxxxxx"
curl -s -X POST "https://api.telegram.org/bot1234567:ABCDEFGHIJKLMN/sendMessage" -F chat_id=12345678 -F text="That is the doorbell"
curl -s -X POST "https://api.telegram.org/bot1234567:ABCDEFGHIJKLMN/sendPhoto" -F chat_id=-12345678 -F photo="@$SnapFile"
/bin/rm $SnapFile