Skip to main content

Download all Snap Map content from a specific location.

Project description

snapmap-archiver

Download all Snap Map content from a specific location.

snapmap-archiver splash

View on PyPI

Installation (for general usage)

Install with pip or pipx or whatever trendy Python package manager you use:

pip install snapmap-archiver

Local Development Setup

Install Poetry with pip or pipx:

pip install poetry

Install the project dependencies:

poetry install

Run the app with Poetry:

poetry run python3 main.py [...args]

Usage

snapmap-archiver -o [OUTPUT DIR] -l="[LATITUDE],[LONGITUDE]"

Unfortunately you have to use the arbitrary -l="lat,lon" (with the equals sign) rather than just -l "lat,lon" when parsing negative numbers as argsparse interprets said numbers as extra arguments.

Optional Arguments

Location

-l is not required if an input file or Snap URL is provided. It can also be used multiple times to download Snaps from multiple locations in one command.

E.g

snapmap-archiver -o ~/Desktop/snap -l='123.123,123.123' -l '445.445,445.445'

Input File

With -f or --file, you can specify a file containing a list of line-separated Snap URLs or IDs.

E.g

snapmap-archiver -o ~/Desktop/snaps -f ~/Desktop/snaps.txt

Inside snaps.txt:

https://map.snapchat.com/ttp/snap/Example/@-33.643495,115.741281,11.86z
Example
https://map.snapchat.com/ttp/snap/Example/
https://map.snapchat.com/ttp/snap/Example/

Snap URL

You can also just pass 1 or more normal Snap URLs or IDs to the package to download it individually like this:

snapmap-archiver -o ~/Desktop/snap 'https://map.snapchat.com/ttp/snap/Example/@-33.643495,115.741281,11.86z' 'Example'

Time Filter

Use the -t flag with a Unix timestamp or day, hour, or minute interval to skip the download of any snaps older than that point.

Example with a Unix timestamp:

snapmap-archiver -t 1714392291 -l '-123,123'

Examples with a dynamic time filter:

snapmap-archiver -t 3d -l='-123,123'  # Removes anything older than 3 days
snapmap-archiver -t 5h -l='-123,123'  # Removes anything older than 5 hours
snapmap-archiver -t 30m -l='-123,123'  # Removes anything older than 30 minutes

Export JSON

You can export a JSON file with info about downloaded snaps with the --write-json argument, which will contain information like the time the Snap was posted, and the Snap location.

It will write archive.json to the specified output directory.

Snap Radius

The radius from the coordinates you provide that will be included for downloads. -r 20000 will download all Snaps within a 20km radius of your coordinates.

Zoom Depth

You can input a custom zoom depth value (-z) that correlates to a zoom level in the GUI. ArcGIS has documentation about this here, but essentially the lower the number, the further zoomed-out you are. 5 is the default and shouldn't cause any issues.

Debug Mode

Enable debug logs with -d/--debug.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapmap_archiver-2.3.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

snapmap_archiver-2.3.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file snapmap_archiver-2.3.0.tar.gz.

File metadata

  • Download URL: snapmap_archiver-2.3.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Windows/10

File hashes

Hashes for snapmap_archiver-2.3.0.tar.gz
Algorithm Hash digest
SHA256 5276dc6894709b5981acc31a1e156d2334c5ca014c927cfb13e240f486ecd072
MD5 87d7d2f73ac1349a4bd560b7af22eb54
BLAKE2b-256 07d350186af8b9298eb8847c55a20792eed0183f9f661d7011b7420e46a1a952

See more details on using hashes here.

File details

Details for the file snapmap_archiver-2.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for snapmap_archiver-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89256de2091e7871d0d8a231d20716c8fc5ea13358929dae01026130fee5178b
MD5 1b00b7543aef1b22836ab1e344142498
BLAKE2b-256 fcde3e8cbef9c8dcef3e4e7f01c88c91a4614f3d984e5bb8803782b3c01abbaa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page