blub
This commit is contained in:
BIN
esp32cam-grabber/20200806-032525.jpg
Normal file
BIN
esp32cam-grabber/20200806-032525.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
BIN
esp32cam-grabber/20200806-032527.jpg
Normal file
BIN
esp32cam-grabber/20200806-032527.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
BIN
esp32cam-grabber/20200806-032528.jpg
Normal file
BIN
esp32cam-grabber/20200806-032528.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
BIN
esp32cam-grabber/20200806-032531.jpg
Normal file
BIN
esp32cam-grabber/20200806-032531.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
BIN
esp32cam-grabber/20200806-032532.jpg
Normal file
BIN
esp32cam-grabber/20200806-032532.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
BIN
esp32cam-grabber/20200806-032534.jpg
Normal file
BIN
esp32cam-grabber/20200806-032534.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 101 KiB |
31
esp32cam-grabber/grab.py
Normal file
31
esp32cam-grabber/grab.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/python
|
||||||
|
|
||||||
|
import requests
|
||||||
|
import datetime
|
||||||
|
from sys import argv
|
||||||
|
|
||||||
|
now = datetime.datetime.now()
|
||||||
|
year, month, day = now.year, now.month, now.day
|
||||||
|
hour, minute, second = now.hour, now.minute, now.second
|
||||||
|
|
||||||
|
if month < 10:
|
||||||
|
month = str('0' + str(month))
|
||||||
|
if day < 10:
|
||||||
|
day = str('0' + str(day))
|
||||||
|
if hour < 10:
|
||||||
|
hour = str('0' + str(hour))
|
||||||
|
if minute < 10:
|
||||||
|
minute = str('0' + str(minute))
|
||||||
|
if second < 10:
|
||||||
|
second = str('0' + str(second))
|
||||||
|
|
||||||
|
response = requests.get("http://10.3.141.94/capture")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
filename = str(year) + str(month) + str(day) + '-' + str(hour) + str(minute) + str(second) + '.jpg'
|
||||||
|
file = open(filename, "wb")
|
||||||
|
file.write(response.content)
|
||||||
|
file.close()
|
||||||
|
if len(argv) > 1:
|
||||||
|
print(filename + ' saved')
|
||||||
Reference in New Issue
Block a user