auto-park

Educational project that explores how to automate collecting episode metadata from the southpark.lat website, work with video and audio streams, and validate media files using tools like python, selenium, beautifulsoup, and ffmpeg.

context

this started from a simple curiosity: if a video plays in the browser, then the data behind it must already be accessible somewhere.

while exploring the southpark.lat site, i noticed how everything was being delivered through streaming, with separate video and audio tracks, adaptive quality, and structured requests happening in the background.

at first it was just about understanding what was going on, how the site organized episodes, how metadata was exposed, and how the player interacted with the underlying streams.

that curiosity slowly turned into something more intentional: figuring out how to automate the whole process in a way that made sense, not just downloading content, but actually understanding how the system worked end to end.

what it does

it automates the whole process of working with streaming content.

it collects episode metadata, captures the actual stream sources from the browser, selects the best available quality, downloads video and audio separately, merges everything, and validates the final files so they do not end up broken.

features

  • builds a full dataset of episodes using the site's own internal structure
  • captures real .m3u8 streams directly from network traffic
  • selects the best quality stream without relying on ui labels
  • downloads video and multiple audio tracks separately
  • merges everything into a single file with proper language tracks
  • validates files to make sure they are actually usable
  • retries automatically when something fails

visuals

process

i started by manually inspecting network requests, looking through the browser devtools to find where the video actually came from, which led me to .m3u8 streams and how they were structured.

from there, i moved into automating the browser using selenium, triggering playback and capturing requests automatically instead of doing everything by hand.

once i had access to the streams, the focus shifted into making decisions: how to reliably pick the best quality, how to deal with multiple audio tracks, and how to handle inconsistencies between episodes and pages.

working with the media itself added another layer, especially merging video and audio correctly and making sure the output was actually valid, which led to using ffmpeg and building validation checks.

at that point, the project stopped being just a script and turned into a pipeline, splitting responsibilities into different parts, adding retries, logging, and making the whole process more consistent and resilient.

a lot of it came down to trial and error, breaking things, fixing them, and slowly building something that worked reliably across different cases.

how to use

usage example

  1. generate a json file with episodes.
    python south_scrapper.py
    creates all_southpark_episodes.json with seasons, episodes, and urls.
  2. automate stream download and merge.
    python autopark.py
    configure profile_path with your firefox profile. episodes are organized in descargas/Season XX/. logs are recorded in descargas.log.
  3. verify video file integrity.
    python tegridy_check.py
    prints a list of files with potential corruption issues.

stack

  • python
  • selenium + selenium wire
  • beautifulsoup
  • ffmpeg / ffprobe

notes

this project is mainly for learning and exploration.

it is about understanding how streaming systems work, how browsers interact with them, and how to build something that can handle that process reliably.

it depends heavily on how the target site is implemented, so it can break if things change.

also, this is not meant for redistributing content, just for understanding the system behind it.

more info on my github repo :D