A collection of modules I have created to programmatically search for/download imagery from live cam feeds across the state of California.

Overview

california-live-cams

A collection of modules that I have created to programmatically search for/download imagery from all publicly available live cam feeds across the state of California. In no way am I affiliated with any of these organizations and these modules/methods of gathering imagery are completely unofficial.

Initially, I wanted to create a fire-detection engine using Haar-Cascade classifiers but due to each image containing a logo, the project requires further problem-solving. I hope these modules help someone else in the meantime!

Alertwildfire.org

This is a very robust module as it contains search features and a querying system that returns results in a JSON object. Aside from California, AWF also has cams in Oregon, Washington, Idaho, Nevada & Utah.

Note: Each image consistently contains a black footer that contains data. Tesseract-OCR engine flawlessly detects the text in the black bar each time which might be very useful to someone.

Source: alertwildfire.org

Usage:

from awf import *
from PIL import Image

if __name__ == '__main__':

    # Initialize an API-session
    api = AWF()

    # This will keep images after the script has stopped if set to False.
    AWF_GLOBALS.BURN_AFTER_READING = True

    # Note: Downloads are saved to the location "__main__/downloads" by default.

    # Get all cams where "county" == "napa", then download the latest image of each result to our cache.
    print("Starting query...")
    query = api.fetchByProp("county", "napa", download=True)

    # If any results from the query:
    if (len(query)):

        print("Found %s matching cams." % len(query))
        
        for cam in query:
            print("Cam ID:   %s" % cam['properties']['id'])
            print("Location: %s, %s" % (cam['properties']['county'], cam['properties']['state'],))
            Image.open(cam['download']['filename']).show()
            _ = input("Hit enter to continue...")

    # Finally, kill our updater thread as it will be hanging.
    AWF_GLOBALS.exit_thread = True

Preview:



Caltrans & DOT

This is a collection of ALL of the Department Of Transportation's highway cams located in the state of California, in cooperation with Caltrans. While there is also live-video feeds selectively available, I have not added a streaming capability to the module yet but plan to in the near future. I did not add a search/query feature to this module as my main focus is around Wildfire detection.

Source: cwwp2.dot.ca.gov

from cdt import *
from PIL import Image
from os import remove

# Iterate over entire set of cams
while True:
    
    # Get current cams from Caltrans/DOT
    # This will create a file, data.json
    cams = getCams(file=True)

    # Iterate cam results
    for cam in cams:

        # Print the cam info
        print()
        print("City:    %s" % cam['city'])   
        print("County:  %s" % cam['county'])     
        print("Highway: %s" % cam['county'])    
        print("Cam ID:  %s" % cam['cam']['id'])   
        print()

        # Get the latest feed image url
        imageLocation = getCamFromPoster(cam['cam']['poster'])

        # Download the image
        filename = getImage(imageLocation, "test.jpg")

        # Show the image
        im = Image.open(filename)
        im.show()

        _ = input("Hit [enter] to continue...")

        remove(filename)

Preview:



Notes

  • I plan to merge both modules into one centralized module with universal search features.

  • Again, in no way am I affiliated with the above organizations.

  • Rate-limiting has not been an issue with either organization but this doesn't mean we can make a rediculous amount of requests... please be respectful!

  • I'm am open to accepting contribution to these modules and future iterations, just DM me on Twitter.

  • Enjoy!!

You might also like...
A growing collection of search plugins for the qBittorrent, an awesome and opensource torrent client

qBittorrent Search Plugins This is a still growing collection of search plugins for qBittorent, an amazing and open source torrent client, maintained

Downloads state flags from wikipedia for states/regions from all countries

world-state-flags Downloads state flags from wikipedia for states/regions from all countries This data is NOT curated Uses https://github.com/dr5hn/co

DYA ( Ditch YouTube API ) is a package created to power the user with YouTube Data API functionality without any API Key

Ditch YouTubeAPI (BETA) DYA ( Ditch YouTube API ) is a package created to power the user with YouTube Data API functionality without any API Key Detai

YouTube Downloader is extremely simple program for downloading songs or playlists (in audio or video) from YouTube. Created using Python, PyTube and PySimpleGUI.
YouTube Downloader is extremely simple program for downloading songs or playlists (in audio or video) from YouTube. Created using Python, PyTube and PySimpleGUI.

YouTube Downloader YouTube Downloader is extremely simple program for downloading songs or playlists (in audio or video) from YouTube. Disclaimer It's

A modern CLI to download animes automatically from Twist
A modern CLI to download animes automatically from Twist

Kurby Kurby is a nice and simple CLI that use Twist website, and their huge collection to download animes for free and automatically Animes from Twist

Download courses from khanacademy.org

khan-dl A python script to download courses from Khan Academy using youtube-dl and beautifulsoup4.

A tool written in Python to download all Snapmaps content from a specific location.
A tool written in Python to download all Snapmaps content from a specific location.

snapmap-archiver A tool written in Python to download all Snapmaps content from a specific location.

1Fichier Download Manager.
1Fichier Download Manager.

1fichier-dl 1Fichier Download Manager. Features ⭐ Manage your downloads ⭐ Bypass time limits Credits All icons, including the app icon, were provided

Command-line program to download videos from YouTube.com and other video sites

youtube-dl - download videos from youtube.com or other video platforms

Owner
Chad Groom
Full Stack dev with interest in OSINT, AI, language-processing, image-processing & security. Non-Security/OSINT @ceegroom. Available for work🤙
Chad Groom
bing image downloader app used to download bulk images for a specific search term created using streamlit and bing_image_downloader python packages

bing image downloader app bing image downloader app is used to download bulk images for a specific search term. bing image downloader app gets the sea

Siva Prakash 8 Apr 5, 2022
Jocomol 16 Dec 12, 2022
The sole purpose of this script is to download any NFT collection from OpenSea

OpenSea NFT Stealer The sole purpose of this script is to download any NFT collection from OpenSea. Setup Prerequisites: Python 3 Python requests libr

Phillip 9 Sep 4, 2022
Download your bandcamp collection using this python script.

bandcamp-downloader Download your Bandcamp collection using this python script. It requires you to have a browser with a logged in session of bandcamp

null 72 Dec 20, 2022
Python script designed to search and fetch direct download links from nxbrew.com

SwitchGamesDownloader Only for windows nxbrew.com is a website, accessible only using a proxy, where the majority of games for the Nintendo Switch are

Backend 91 Dec 28, 2022
Python based Telegram bot. Search and download YouTube video or audio.

Python-Telegram-Youtube-Media-Bot Python based Telegram bot. Search and download YouTube video or audio. Just change settings.py and start TelegramBot

Ahmet Bohur 2 Oct 2, 2022
Search the gallerys by tag and download pictures to the local

booruDownloader Search the gallerys by tag and download pictures to the local

null 6 Jun 30, 2022
Download Web-10K data by querying Bing Image Search

gpv2-web10k This repository contains the script to download images from the Web-10K dataset. The script takes in a list of queries, queries Bing Image

AI2 8 Sep 6, 2022
Search & download music from a certain streaming service

Search & download music from a certain streaming service

mat 2 Mar 11, 2022