Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A script to download new photos from Georgia Department of Transportation traffic cameras.
#!/usr/bin/python3
import wget
from diffimg import diff
import datetime
import glob
import os
import re
cameras = {
"GA 400":[
"http://cdn.511ga.org/cameras/GDOT-CAM-806.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-809.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-811.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-812.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-814.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-816.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-817.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-819.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-821.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-824.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-830.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-831.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-833.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-832R-N.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-836.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-836R-N.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-839R-N.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-842.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-842R-N.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-843.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-844R-N.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-844R-N.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-845.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-847.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-848.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-849.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-851.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-853.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-807.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-808.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-810.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-813.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-815.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-818.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-820.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-822.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-823.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-825.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-826.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-827.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-828.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-829.jpg"
],
"I-85":[
"http://cdn.511ga.org/cameras/GDOT-CAM-157.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-159.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-161.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-163.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-164.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-167.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-169.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-171.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-172.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-173.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-175.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-797.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-178.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-180.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-181.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-182.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-184.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-186.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-188.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-190.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-191.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-177.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-179.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-183.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-185.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-187.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-189.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-197.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-196.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-198.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-061.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-550.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-552.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-094.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-553.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-125.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-126.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-130.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-131.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-133.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-154.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-157.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-191.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-192.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-193.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-194.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-195.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-199.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-078.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-077.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-076.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-075.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-074.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-073.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-072.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-071.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-001.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-022.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-092.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-035.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-036.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-144.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-037.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-037.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-038.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-039.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-551.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-040.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-041.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-042.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-043.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-093.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-044.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-045.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-046.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-117.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-118.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-119.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-084.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-121.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-085.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-086.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-087.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-100.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-100.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-101.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-102.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-103.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-104.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-105.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-106.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-107.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-108.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-554.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-109.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-110.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-555.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-122.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-123.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-124.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-129.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-152.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-153.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-132.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-155.jpg"
],
"I-75":[
"http://cdn.511ga.org/cameras/GDOT-CAM-767.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-766.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-765.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-764.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-763.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-762.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-761.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-760.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-758.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-754.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-684.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-756.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-753.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-752.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-750.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-749.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-747.jpg",
"http://cdn.511ga.org/cameras/HNRY-CAM-916.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-746.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-744.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-743.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-743.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-741.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-719.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-740.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-739.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-735.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-733.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-730.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-731.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-713.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-712.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-711.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-710.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-709.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-707.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-706.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-705.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-703.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-704.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-701.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-068.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-068.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-070.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-082.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-021.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-582.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-023.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-026.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-099.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-027.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-028.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-029.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-030.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-031.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-457.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-460.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-458.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-401.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-034.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-464.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-468.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-471.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-471.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-474.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-403.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-404.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-405.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-406.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-407.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-409.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-411.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-412.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-415.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-416.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-417.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-418.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-420.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-427.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-429.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-519.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-521.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-431.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-520.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-520.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-433.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-522.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-435.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-436.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-437.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-438.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-439.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-527.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-441.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-529.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-530.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-531.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-447.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-448.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-450.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-I-75-278.jpg",
"http://cdn.511ga.org/cameras/HNRY-CAM-001.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-759.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-757.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-755.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-755.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-751.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-748.jpg",
"http://cdn.511ga.org/cameras/HNRY-CAM-917.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-745.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-742.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-725.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-720.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-718.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-738.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-737.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-685.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-736.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-734.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-714.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-732.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-774.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-729.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-727.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-726.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-708.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-708.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-702.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-721.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-063.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-064.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-066.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-067.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-062.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-069.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-083.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-081.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-080.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-079.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-024.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-025.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-091.jpg",
"http://cdn.511ga.org/cameras/HUBM-VANDAL-CAM.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-095.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-096.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-455.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-456.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-456.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-032.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-065.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-033.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-459.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-047.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-461.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-463.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-466.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-465.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-467.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-469.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-470.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-473.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-475.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-480.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-481.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-482.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-483.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-484.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-485.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-485.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-486.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-413.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-487.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-414.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-488.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-489.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-490.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-421.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-491.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-492.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-493.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-423.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-424.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-425.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-496.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-497.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-426.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-428.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-430.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-432.jpg"
],
"I-285":[
"http://cdn.511ga.org/cameras/GDOT-CAM-663.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-622.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-626.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-201.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-628.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-204.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-205.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-206.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-207.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-211.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-212.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-214.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-215.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-216.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-219.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-224.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-228.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-580.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-229.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-230.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-232.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-232.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-231.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-233.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-234.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-235.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-269.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-273.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-274.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-275.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-278.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-279.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-280.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-281.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-673.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-670.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-666.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-654.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-665.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-660.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-657.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-658.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-658.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-652.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-648.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-651.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-650.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-646.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-645.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-932.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-936.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-934.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-941.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-942.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-944.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-945.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-946.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-950.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-948.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-952.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-953.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-954.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-955.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-955.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-961.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-962.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-963.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-619.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-971.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-620.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-970.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-621.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-624.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-238.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-239.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-240.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-242.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-243.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-245.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-247.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-249.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-250.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-252.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-253.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-253.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-255.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-254.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-283.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-257.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-258.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-259.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-262.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-260.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-264.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-265.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-933.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-935.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-937.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-938.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-939.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-940.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-943.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-947.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-951.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-956.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-956.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-957.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-958.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-959.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-960.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-964.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-965.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-966.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-967.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-968.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-969.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-236.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-585.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-237.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-241.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-244.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-246.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-248.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-251.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-282.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-261.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-261.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-263.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-930.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-931.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-625.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-623.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-627.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-629.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-630.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-299.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-631.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-632.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-579.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-208.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-209.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-210.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-213.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-218.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-217.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-220.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-221.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-221.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-222.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-200.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-223.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-225.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-584.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-226.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-227.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-581.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-266.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-267.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-268.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-270.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-271.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-272.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-276.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-277.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-672.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-671.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-669.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-668.jpg"
],
"I-75|85":[
"http://cdn.511ga.org/cameras/GDOT-CAM-583.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-578.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-008.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-573.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-577.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-574.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-566.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-575.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-576.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-013.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-015.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-151.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-002.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-003.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-004.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-098.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-005.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-006.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-571.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-572.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-007.jpg",
"http://cdn.511ga.org/cameras/GDOT-CAM-177.jpg"
]
}
full_time_format = "%m-%d-%Y-%H:%M"
date_format = "%m-%d-%Y"
time_format = "%H:%M"
# Grab, analyze, store new photos
folder = os.path.join(os.path.dirname(__file__), "images/"+str(datetime.datetime.now().strftime(date_format)))
print(folder)
for f, links in cameras.items():
# Make directory if doesn't exist
print("\nGrabbing " + str(len(links)) + " " + f + " cameras...")
try:
os.makedirs(folder+"/"+f)
print("\nMade new time directory for " + f)
except FileExistsError:
print("\nCurrent time directory already exists for " + f)
pass
for i in links:
name = re.findall("/([\w\-]*)\.jpg",i)[0]
if name != '':
try:
old_file = max(glob.iglob(folder+"/"+f+"/"+name+"*"),key=os.path.getctime, default=None)
#print(old_file)
new_file = wget.download(i, out=folder+"/"+f+"/"+name+"_"+str(datetime.datetime.now().strftime(full_time_format))+".jpg")
#print(new_file)
if old_file and diff(old_file,new_file) < .05: # Compare new downloaded image to previous image, delete if the same
os.remove(new_file)
print("\nNot a new image for " + name + ", deleted")
elif diff(new_file, os.path.join(os.path.dirname(__file__),"images/ua.jpg")) < .05: # Compare the new downloaded image to "Snapshots unavailable" image, delete if the same
os.remove(new_file)
print("\nSnapshot unavailable for " + name + ", deleted")
except Exception as e:
print("\nError: Image from " + i + " not downloaded")
print("\nAll cameras updated.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.