How to mass import YouTube videos into a Reddit subreddit [Python]
Tags: python, automation, youtube, reddit
Published: 2024-01-19 22:53:41

We're introducing **["py-youtube-to-subreddit,"](https://github.com/gbti-labs/py-youtube-to-subreddit)** a Python tool available on [GitHub](https://github.com/gbti-labs/py-youtube-to-subreddit). This tool was developed for importing YouTube channel and playlist content efficiently to specific Reddit subreddits.

## Key Features:
1. **Individual Video Iteration:** Loop through imported videos and determine to skip or publish.
2. **Sorting Options:** Organize videos by date, view count, or likes.
3. **Enhanced Commenting Feature:** Automatically post the video description as the first comment. The comments are customizable using a template from the config.json file.
4. **Subreddit Post Existence Check:** Verifies if the video is already posted to avoid duplicates.

## Why build this?

We have a client, [MetaCast Studios](https://www.youtube.com/@metacastenterainment/playlists), who wanted to do two things: 

1.  Create a subreddit to host all their full playthrough no commentary videos.
2. Create an additional subreddit called BossFightVideos where they wanted to import post videos from boss fight playlists (and invite other redditors to publish their boss fight video productions).

We were absolutely amazed at how easy it was to accomplish this migration script. The command line experience that we coded in made for a very pleasant transfer routine and allowed us to control what was published and what was not. 

All in all we transferred about **70 videos** to the new **/r/metacastgaming** and about **25 boss fights** to **/r/bossfightvideos**.

We did run into major issues with the moderation team because of the volume of videos we imported which we are currently hoping to work through (see disclaimer below). 

## Disclaimer, fear the hammer. It is real. 

![Banned by the ban hammer!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1n9isyvrluhxdxcv3a1w.png)

To our disappointment, Reddit was quick to ban the two subreddits we used this for, labeling the subreddits as Spam (ouch for us and our client!). 

This may have been an automated ban, it could be a manual ban. It could be because the account age is new or there is only one measly Karama point associated with it😄. We do not know. We are currently appealing the ban because we believe the use case is honest and aspires to add value not degrade the reddit experience. But with powerful tools like these, we can understand Reddit as a platform being sensitive. 

So please, if you use this asset, be(a)ware that either Reddit's automated systems or moderators may not support the usage. We advise taking your migration routines slow and cautiously or even better, ask for permission ahead of time, if possible.

We're also linking to [Reddit's Developer Terms](https://www.redditinc.com/policies/developer-terms) page for study, if anyone is curious about how this tool relates to permissible usage. 

If you like our content and code, please consider dropping a star on the [github repo](https://github.com/gbti-labs/py-youtube-to-subreddit) as well as following our socials (listed below) for more novel open source applications like this. 

Lots of love. 

## Follow GBTI for more

Thanks for reading! If you enjoy our content, follow us on:

[Twitter/X](https://twitter.com/gbtilabs) | [GitHub](https://github.com/gbti-labs) | [YouTube](https://www.youtube.com/channel/UCh4FjB6r4oWQW-QFiwqv-UA) | [Dev.to](https://dev.to/gbti) | [Daily.dev](https://dly.to/zfCriM6JfRF) | [Hashnode](https://gbti.hashnode.dev/) | [Blog / Discord](https://gbti.io)