animefreak.tv video extractor
afextract.py (python3 script)
This quick-and-dirty script can be used to extract direct-download URLs for some of the videos hosted by animefreak.tv (a rather shady anime streaming service). It expects a URL as a command-line argument and, if successful, prints the extracted video URL to stdout. For example:
$ python3 afextract.py 'http://www.animefreak.tv/watch/kotoura-san-episode-1-online' http://st5.anime1.com/Kotoura-san Episode 1.mp4?st=K20WGzQJmkNjgCOQJ9Y4sQ&e=1421012503 $ wget 'http://st5.anime1.com/Kotoura-san Episode 1.mp4?st=K20WGzQJmkNjgCOQJ9Y4sQ&e=1421012503' -O 'Kotoura-san Episode 1.mp4' ...
As of January 2015, it only works on videos served with af.tv’s
playernew.swf player. There’s no error handling to speak of, so it’s likely to dump a traceback on you if things don’t go exactly as expected.
I wrote this script as a small programming/cryptanalysis/web scraping exercise, and I post it on the off-chance that someone finds it useful. A credible next-step might be to wrap this as a youtube-dl extractor, but as of this writing, youtube-dl’s testing policy requires us to find a video that doesn’t look like copyright infringement, and af.tv generally doesn’t look legal.
To the extent possible under law, Daniel Gnoutcheff has waived all copyright and related or neighboring rights to Animefreak.tv video extractor. This work is published from: United States.