DeleteCity saves videos from being deleted from YouTube caching a bunch of them on your server, then checking back periodically to see if they have been taken down. When it finds videos that have been removed, it posts them on your blog with a link to the author’s YouTube page. You can tell DeleteCity to use YouTube feeds by keyword to customize which videos you try to save. Devious? Maybe. But also one step in the fight against censorship.
WARNING: The plugin was designed to take advantage of the huge hard drive space/bandwidth allotments of some hosting providers and shouldn’t be used if you are charged for either by the MB.
more info: http://www.jeffcrouse.info/projects/delete-city/
*nix only! (Mac or Linux server) I use a bunch of system commands (mostly for process control) that I don’t know how to
translate into Windows. I’d love someone to help me, though!
PHP >= 5.1 (according to http://phpduck.com/minimum-php-version-script/)
Python >= 2.5
IMPORTANT: Apparently many videos are blocked outside of the US, so this plugin will probably fail for non-US users.
feed should only show 20 entries
get_web_page() uses cURL, which might not be installed on all systems. Switch to some full-featured HTTP client.
In admin form, cache process indicator doesn’t change when runcache finishes
Allow usernames in blacklist
regex validation for rate limit
Implement dc_max_cache_size option (it currently does nothing)
Can I include some file in runcache that will allow me to get WordPress options? That would allow me to avoid all of this parameter passing…
What should happen if someone changes their cache directory?
Testing if video had been removed: testing for presence of <?xml in response probably isn’t good enough. Here are some removed videos to test with.
http://www.youtube.com/watch?v=eouvTRd6szQ account terminated
http://www.youtube.com/watch?v=PgEo_7rMH0Q account terminated
http://www.youtube.com/watch?v=JdGJxI6LrX4 removed by user
http://www.youtube.com/watch?v=vQsFI4Wp6kI removed by user
Option to automatically email the video author to ask why the video was taken down 🙂
Batch query in runcache.php?
Catch exceptions from Video class
Database security: save database file outside of web-readable directory? Is there a better way?
Central database (on deletecity.org) ping when a deleted video is found. (optional for user)
Use PDO instead of SQLite
Look for media restriction tag in XML
Check the PHP version at activation
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Check out the ‘Delete City Settings’ page under ‘Settings’ in the admin section
- Check out the ‘Delete City Status’ page under ‘Plugins’ to see the status of caching/saving, and to manually start the caching process.
- How does it work?
DeleteCity adds 2 scheduled tasks to your WordPress blog (you can use the CronView plugin to see them https://wordpress.org/extend/plugins/cron-view/): the caching task and the posting task. You can change the frequency of these tasks under “Delete City Settings”.
By default, the caching process runs twice a day. It fetches standard YouTube feeds that you supply and downloads each video in the feed to your server using youtube-dl. It notes the time that it was downloaded, as well as the title, author, and other properties. The next time the caching process is run, DC checks back to see if the video is still available. If it has been removed, the video is marked as “removed”.
To save hard drive space, videos are automatically deleted after 3 days (customizable in Settings) if they are not found to have been removed.
Once a week, DeleteCity will post all of the deleted videos it finds to your blog.
As shown below in the TO DO section, future versions will optionally email the author of the videos and invite them to come back to your blog and comment on why the video was taken down. It will also (optionally) submit deleted videos to a central database that will be made avaialble to the public.
- What is youtube-dl?
youtube-dl is a 3rd party script for downloading YouTube videos. You probably
shouldn’t use this directly – it is called from the other scripts. You can
find out more about it here: http://rg3.github.com/youtube-dl/
- Why did you make this? or Why would I want this?
Good question! It is unarguably a niche plugin, and not terribly practical.
Let’s just say that this readme file isn’t the proper place for that topic. If you’d like to discuss it, I invite you to email me at jeff [at] crouse [dot] cc.
Contributors & Developers
“Delete City” is open source software. The following people have contributed to this plugin.Contributors
- Initial Release
- No longer using SQlite database.
- Tons of stability improvements
- Posted videos are moved into uploads directory
- Posted videos become their own attachments