added more cameras, working on image to video conversion
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 36 KiB |
@@ -1,4 +1,5 @@
|
|||||||
##PortCameras
|
PortCameras
|
||||||
|
-----------
|
||||||
|
|
||||||
This is simple python script that downloads live images from the cameras at https://www.portvancouver.com/webcam-page.
|
This is simple python script that downloads live images from the cameras at https://www.portvancouver.com/webcam-page.
|
||||||
These cameras have a framerate of 10-15 seconds per frame.
|
These cameras have a framerate of 10-15 seconds per frame.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
4
ffmpeg-image-to-video.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ffmpeg -f image2 -framerate 2 -i %*.jpg -c:v v210 deltavideo.mov
|
||||||
|
|
||||||
|
#only works in wsl / linux
|
||||||
|
|
||||||
17
httptest.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import requests
|
||||||
|
from time import time
|
||||||
|
|
||||||
|
headerz = { 'Referer' :
|
||||||
|
'https://www.portvancouver.com/' }
|
||||||
|
|
||||||
|
milliseconds = int(time() * 1000)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
x = requests.get("https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?" + str(milliseconds), headers=headerz)
|
||||||
|
image_name = "image" + str(milliseconds) + ".jpg"
|
||||||
|
milliseconds -= 20000
|
||||||
|
|
||||||
|
if x.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x.content)
|
||||||
|
print(x.status_code)
|
||||||
@@ -1,2 +1,25 @@
|
|||||||
#make this
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
shutil.rmtree("Centerm in gate")
|
||||||
|
shutil.rmtree("Clark Drive overpass")
|
||||||
|
shutil.rmtree("Columbia Container - crossing")
|
||||||
|
shutil.rmtree("Commissioner entrance")
|
||||||
|
shutil.rmtree("Commissioner street overpass")
|
||||||
|
shutil.rmtree("Commissioner truck staging")
|
||||||
|
shutil.rmtree("Delta truck staging")
|
||||||
|
shutil.rmtree("Deltaport causeway")
|
||||||
|
shutil.rmtree("Deltaport gate 1")
|
||||||
|
shutil.rmtree("Deltaport gate 3")
|
||||||
|
shutil.rmtree("Fraser Surrey in gate")
|
||||||
|
shutil.rmtree("Fraser Surrey main intersection")
|
||||||
|
shutil.rmtree("Fraser Surrey track crossing")
|
||||||
|
shutil.rmtree("Fraser Surrey VACS gates")
|
||||||
|
shutil.rmtree("Portside road - westbound")
|
||||||
|
shutil.rmtree("PortsideBlundellNo.8 road intersection")
|
||||||
|
shutil.rmtree("Terminal dock")
|
||||||
|
shutil.rmtree("Vanterm Alliance Grain Terminal crossing")
|
||||||
|
shutil.rmtree("Vanterm in gate")
|
||||||
|
shutil.rmtree("Waterfront_road Centerm crossing")
|
||||||
|
|
||||||
|
subprocess.run(["python", "folder_create.txt"])
|
||||||
@@ -20,8 +20,15 @@ x7 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/ColumbiaContain
|
|||||||
x8 = requests.get("https://ehub.portvancouver.com/webcams/Photos/TerminalDock?" + str(milliseconds))
|
x8 = requests.get("https://ehub.portvancouver.com/webcams/Photos/TerminalDock?" + str(milliseconds))
|
||||||
x9 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?" + str(milliseconds))
|
x9 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?" + str(milliseconds))
|
||||||
x10 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?" + str(milliseconds))
|
x10 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?" + str(milliseconds))
|
||||||
|
x11 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/CameraDP_FS1?" + str(milliseconds))
|
||||||
|
x12 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate1?" + str(milliseconds))
|
||||||
|
x13 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/DMSWest?" + str(milliseconds))
|
||||||
|
x14 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/FSMainIntersection?" + str(milliseconds))
|
||||||
|
x15 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/FSTruckInGate?" + str(milliseconds))
|
||||||
|
x16 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/FSVACSGates?" + str(milliseconds))
|
||||||
|
x17 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/FS5TrackCrossing?" + str(milliseconds))
|
||||||
|
x18 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?" + str(milliseconds))
|
||||||
|
x19 = requests.get("https://ehub.portvancouver.com/Webcams/Photos/PortsideCoast2000?" + str(milliseconds))
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
milliseconds = int(time() * 1000)
|
milliseconds = int(time() * 1000)
|
||||||
@@ -35,6 +42,15 @@ while True:
|
|||||||
str8 = "https://ehub.portvancouver.com/webcams/Photos/TerminalDock?" + str(milliseconds)
|
str8 = "https://ehub.portvancouver.com/webcams/Photos/TerminalDock?" + str(milliseconds)
|
||||||
str9 = "https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?" + str(milliseconds)
|
str9 = "https://ehub.portvancouver.com/Webcams/Photos/CommEntrance?" + str(milliseconds)
|
||||||
str10 = "https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?" + str(milliseconds)
|
str10 = "https://ehub.portvancouver.com/Webcams/Photos/CommOverMcGill?" + str(milliseconds)
|
||||||
|
str11 = "https://ehub.portvancouver.com/Webcams/Photos/CameraDP_FS1?" + str(milliseconds)
|
||||||
|
str12 = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate1?" + str(milliseconds)
|
||||||
|
str13 = "https://ehub.portvancouver.com/Webcams/Photos/DMSWest?" + str(milliseconds)
|
||||||
|
str14 = "https://ehub.portvancouver.com/Webcams/Photos/FSMainIntersection?" + str(milliseconds)
|
||||||
|
str15 = "https://ehub.portvancouver.com/Webcams/Photos/FSTruckInGate?" + str(milliseconds)
|
||||||
|
str16 = "https://ehub.portvancouver.com/Webcams/Photos/FSVACSGates?" + str(milliseconds)
|
||||||
|
str17 = "https://ehub.portvancouver.com/Webcams/Photos/FS5TrackCrossing?" + str(milliseconds)
|
||||||
|
str18 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideNo8?" + str(milliseconds)
|
||||||
|
str19 = "https://ehub.portvancouver.com/Webcams/Photos/PortsideCoast2000?" + str(milliseconds)
|
||||||
|
|
||||||
|
|
||||||
image_name = "image" + str(milliseconds) + ".jpg"
|
image_name = "image" + str(milliseconds) + ".jpg"
|
||||||
@@ -148,6 +164,97 @@ while True:
|
|||||||
else:
|
else:
|
||||||
print("Copy detected and removed (x10)")
|
print("Copy detected and removed (x10)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x11)
|
||||||
|
x11 = requests.get(str11, headers=headerz)
|
||||||
|
if x11.content != image_check.content:
|
||||||
|
with chdir('Deltaport causeway'):
|
||||||
|
if x11.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x11.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x11)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x12)
|
||||||
|
x12 = requests.get(str12, headers=headerz)
|
||||||
|
if x12.content != image_check.content:
|
||||||
|
with chdir('Deltaport gate 1'):
|
||||||
|
if x12.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x12.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x12)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x13)
|
||||||
|
x13 = requests.get(str13, headers=headerz)
|
||||||
|
if x13.content != image_check.content:
|
||||||
|
with chdir('Delta truck staging'):
|
||||||
|
if x13.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x13.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x13)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x14)
|
||||||
|
x14 = requests.get(str14, headers=headerz)
|
||||||
|
if x14.content != image_check.content:
|
||||||
|
with chdir('Fraser Surrey main intersection'):
|
||||||
|
if x14.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x14.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x14)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x15)
|
||||||
|
x15 = requests.get(str15, headers=headerz)
|
||||||
|
if x15.content != image_check.content:
|
||||||
|
with chdir('Fraser Surrey in gate'):
|
||||||
|
if x15.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x15.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x15)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x16)
|
||||||
|
x16 = requests.get(str16, headers=headerz)
|
||||||
|
if x16.content != image_check.content:
|
||||||
|
with chdir('Fraser Surrey VACS gates'):
|
||||||
|
if x16.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x16.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x16)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x17)
|
||||||
|
x17 = requests.get(str17, headers=headerz)
|
||||||
|
if x17.content != image_check.content:
|
||||||
|
with chdir('Fraser Surrey track crossing'):
|
||||||
|
if x17.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x17.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x17)")
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x18)
|
||||||
|
x18 = requests.get(str18, headers=headerz)
|
||||||
|
if x18.content != image_check.content:
|
||||||
|
with chdir('PortsideBlundellNo.8 road intersection'):
|
||||||
|
if x18.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x18.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x18)")
|
||||||
|
|
||||||
|
|
||||||
|
image_check = copy.deepcopy(x19)
|
||||||
|
x19 = requests.get(str19, headers=headerz)
|
||||||
|
if x19.content != image_check.content:
|
||||||
|
with chdir('Portside road - westbound'):
|
||||||
|
if x19.status_code == 200:
|
||||||
|
with open(image_name, 'wb') as f:
|
||||||
|
f.write(x19.content)
|
||||||
|
else:
|
||||||
|
print("Copy detected and removed (x19)")
|
||||||
|
|
||||||
image_check = copy.deepcopy(x1)
|
image_check = copy.deepcopy(x1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,12 @@ headerz = {'Accept' : 'image/avif,image/webp,image/png,image/svg+xml,image/*;q=0
|
|||||||
|
|
||||||
|
|
||||||
milliseconds = int(time() * 1000)
|
milliseconds = int(time() * 1000)
|
||||||
image_check = requests.get("https://ehub.portvancouver.com/Webcams/Photos/CommOver?" + str(milliseconds))
|
image_check = requests.get("https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate3?" + str(milliseconds))
|
||||||
|
print(image_check)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
milliseconds = int(time() * 1000)
|
milliseconds = int(time() * 1000)
|
||||||
str1 = "https://ehub.portvancouver.com/Webcams/Photos/CommOver?" + str(milliseconds)
|
str1 = "https://ehub.portvancouver.com/Webcams/Photos/DeltaportGate3?" + str(milliseconds)
|
||||||
|
|
||||||
image_name = "image" + str(milliseconds) + ".jpg"
|
image_name = "image" + str(milliseconds) + ".jpg"
|
||||||
|
|
||||||
|
|||||||