Twitch-Workflow is a command-line tool designed for Twitch streamers to seamlessly download their videos and upload them to YouTube. This workflow automates the process, ensuring efficiency and preventing duplicate uploads.
- Download Twitch Videos: Extract and download videos from your Twitch account.
- Upload to YouTube: Automatically upload downloaded videos to your YouTube channel.
- Duplicate Prevention: Track downloaded and uploaded videos to prevent duplicates.
- Python 3.x
requests
librarygoogle-auth
librarygoogle-api-python-client
library
-
Clone the Repository:
git clone https://github.com/yourusername/twitch-workflow.git cd twitch-workflow
-
Configure API Tokens:
- Obtain your Twitch API token.
- Obtain your YouTube API token.
- Create a Google Console Project and enable the YouTube Data API.
-
Save Video Information:
- Save your video information in a JSON file (
twitch_videos.json
). - Direct the output of your script or API call to this JSON file.
- Save your video information in a JSON file (
-
Extract and Download Videos:
- Run the
extract_and_download.sh
script to extract video URLs fromtwitch_videos.json
and download the videos.
./extract_and_download.sh
- Run the
-
Upload Videos to YouTube:
- Use the
upload_video.py
script to upload the downloaded videos to your YouTube channel.
python upload_video.py
- Use the
videos/
: Directory where all downloaded videos are stored.downloaded_videos.txt
: File containing URLs of all downloaded videos.uploaded_videos.txt
: File containing URLs of all uploaded videos.extract_and_download.sh
: Script to extract URLs fromtwitch_videos.json
and download the videos.twitch_videos.json
: JSON file containing video information from Twitch.upload_video.py
: Script to upload videos to YouTube.extract.py
: Script to extract video URLs fromtwitch_videos.json
.README.md
: This file.
twitch-workflow/
├── videos/ # Directory for storing videos
├── downloaded_videos.txt # Contains URLs of downloaded videos
├── uploaded_videos.txt # Contains URLs of uploaded videos
├── extract_and_download.sh # Script to extract and download videos
├── twitch_videos.json # JSON file with video information
├── upload_video.py # Script to upload videos to YouTube
├── extract.py # Script to extract video URLs from JSON
└── README.md # Project documentation
- Ensure that
downloaded_videos.txt
anduploaded_videos.txt
are up-to-date to prevent re-downloading or re-uploading the same videos. - Follow the API documentation for detailed steps on obtaining and configuring your API tokens.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
For any questions or issues, please open an issue on GitHub.