Skip to main content

Daemon for monitoring YouTube channels for new videos. Offers automatic backup of uploaded content

Project description

Copyright (c) 2018 Michal Korman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Description: # yt-archiver
yt-archiver offers automatic backup for YouTube videos and livestreams. All you need to do is to choose channels to follow and leave it
running 24/7. It will automatically download any new content. Copies will be accessible even if original video or
associated channel would become unavailable.

*Nothing gets deleted from the Internet*

## Installation

### Prerequirements
- Python 3
- pip
- YouTube API key (this could be obtained by following
[the official guide](https://developers.google.com/youtube/registering_an_application), most interesting sections would be
*"Create your project and select API services"* and *"Creating API Keys"*)
- Identifiers of channels that you would like to follow. To obtain these simply open YouTube in browser and navigate to your favorite channel.
In the navigation bar there will be an URL in format: ```https://www.youtube.com/channel/<ID>```. Series of characters
visible in place of ```<ID>``` will indicate the unique identifier of the channel. Copy it.

### Steps
1. Install command line tool:
```
pip3 install yt-archiver
```
2. Start monitoring with:
```
ytarchiver -k <YOUR_API_KEY> -m <CHANNELS_ID>
```
Of course replace ```<YOUR_API_KEY>``` with your personal YouTube API key and ```<CHANNELS_ID>``` with identifiers of
channels that you would like to monitor. Multiple identifiers could be specified after space. ```ytarchiver```
command is installed globally, so you can invoke it from any directory.

Now application should automatically download any new video. By default videos are stored in ```out``` folder.


### Custom options
#### Record livestreams
yt-archiver offers an option to automatically record any livestream started on monitored channels.
All you need to do is to add ```-s``` option.
```
ytarchiver -k <YOUR_API_KEY> -m <CHANNELS_ID> -s
```

#### Changing output directory
By default yt-archiver saves all downloaded videos to ```out``` directory, in application's folder.
```-o``` option allows to change it.
```
ytarchiver -k <YOUR_API_KEY> -m <CHANNELS_ID> -o <CUSTOM_OUTPUT_DIRECTORY>
```

#### Downloading historical data
By default yt-archiver only downloads videos published after it is started. To download all videos from the past specify
```-a``` option.
```
ytarchiver -k <YOUR_API_KEY> -m <CHANNELS_ID> -a
```
**WARNING:** downloading all videos from channel might take a lot of time and consume a lot of disk space

#### Changing refresh time
Default delay between consecutive requests for new videos is 5 minutes. It might be changed with ```-t``` option.
```
ytarchiver -k <YOUR_API_KEY> -m <CHANNELS_ID> -t 60
```
```-t``` expects time in seconds. Command above will fetch channels every 1 minute.

Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python
Classifier: Environment :: Console

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

yt-archiver-0.5.0.tar.gz (11.4 kB view details)

Uploaded Source

File details

Details for the file yt-archiver-0.5.0.tar.gz.

File metadata

  • Download URL: yt-archiver-0.5.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yt-archiver-0.5.0.tar.gz
Algorithm Hash digest
SHA256 205f6a62b87a3d31a7081573c143040a08c98f7abd35f72cacc1c768c728eb30
MD5 75b95d7000076be8633add6b7084c5a2
BLAKE2b-256 0012b0acb15877b3322b39ed0731ce8e71a98ec3fc6ef03eef3bb8b7b268e675

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