Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/8ightfold/yspin
A Youtube video downloader and reuploader written in Python
https://github.com/8ightfold/yspin
Last synced: 4 days ago
JSON representation
A Youtube video downloader and reuploader written in Python
- Host: GitHub
- URL: https://github.com/8ightfold/yspin
- Owner: 8ightfold
- License: mit
- Created: 2023-03-01T20:21:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-27T01:34:09.000Z (about 1 year ago)
- Last Synced: 2023-09-27T10:50:45.011Z (about 1 year ago)
- Language: Python
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yspin
This library is a little Youtube video handler that I wrote for archiving videos. You can download videos from Youtube into folders, and then parse these folders and reupload them to a single channel.Yspin requires ``ffmpeg``, ``pytube``, ``urllib``, and ``playwright``.
## Usage
### Downloading
To download a list of videos, you must create a text file with all the links you need. Be sure each link is on its own line, and that you do not have blank lines. You can then pass the filepath into ``download_from_file``, or if it's in the current directory and named ``videos.txt``, you can call the function with no arguments. The program will then spawn many processes, each downloading a chunk of links from Youtube. Be sure you have a ``__main__``, with any functions that must be called for each process being out of ``__main__``, and any that should not be called being inside of it.Here is an example of a list of videos:
```
https://www.youtube.com/watch?v=IJ4kPmiUP_Y
https://www.youtube.com/watch?v=-Vvex2oThtA
https://www.youtube.com/watch?v=yVHPL80z59w
```You will now have a bunch of subfolders with the following format:
```
videos
└─── Video_name_1
│ │── desc.txt
│ │── thumb.png
│ │── title.txt
│ \── vid.mp4
│ ...
```
These will be used to properly reupload videos later.### Reuploading
To reupload your folders, you need to call ``upload_to_channel``, passing the path to your "secrets" json file (or nothing if it's called ``secrets.json``.The file should be in the following format:
```json
{
"link": "https://www.youtube.com/channel/...",
"username": "name@site",
"password": "your_silly_password"
}
```
There are slight variations you can use, but I won't go into them here as they aren't the intended format.You should now see your videos being reuploaded. Unlike with the downloader, the reuploader should not be run as multiple processes. Youtube will flag your account as being hacked, and will sign you out. The same goes for uploading too quickly. You can change the amount of time between chunked uploads, but be careful.
You also need to verify your Youtube account to upload thumbnails. If you do not, the reuploader will time out. You may also have issues with upload limits if you are reuploading a lot of videos.
## Disclaimer
DO NOT use this to pass someone else's content as your own. This was only made for saving videos from many sources for easy viewing. I do not condone the use of yspin for malicious purposes. If you modify the program or use it for another purpose, that's on you.## Notes
This program was meant for archival purposes. It is not meant to be extremely portable, nor flexible. If you run into any issues with the intended usage, let me know; otherwise, you're on your own.