https://github.com/luispadron/youtube-subscription-importer
Imports subscriptions from one YouTube account to another using Python 3.
https://github.com/luispadron/youtube-subscription-importer
google google-api python3 subscriptions youtube youtube-api
Last synced: 8 months ago
JSON representation
Imports subscriptions from one YouTube account to another using Python 3.
- Host: GitHub
- URL: https://github.com/luispadron/youtube-subscription-importer
- Owner: luispadron
- License: mit
- Created: 2017-08-02T19:41:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T01:19:24.000Z (over 8 years ago)
- Last Synced: 2025-06-23T15:59:16.753Z (8 months ago)
- Topics: google, google-api, python3, subscriptions, youtube, youtube-api
- Language: Python
- Size: 7.81 KB
- Stars: 15
- Watchers: 0
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Subscription Importer
Imports subscriptions from an xml/rss feed file into a youtube account. This is useful for transferring youtube subscriptions from one youtube account to another.
## Usage
1. Get the properly formatted xml file from the account you wish to transfer subscriptions from
- Go to Subscriptions
- Go to Manage Subscriptions
- Scroll to end of page
- Click Export Subscriptions next to Export to RSS readers
2. Get authenticated, since this requires access to your google account you must generate the correct `client_secrets.json` file
- Create project in the [Developer Console](https://console.developers.google.com/apis/dashboard)
- Next register for YouTube API, go to the project you just created and in the [Developer Console](https://console.developers.google.com/apis/dashboard).
- Go to the [API Library](https://console.developers.google.com/apis/library) and turn __YouTube Data API__ to __ON__.
- Download JSON credentials, go to __Credentials__ if not created already, create one must be __OAuth 2.0__. Select the created credential and click on __Download JSON__.
- Rename the downloaded JSON file to `client_secrets.json` and drag into this root directory, must be in the same folder as `subscribe.py`.
3. Make sure all required packages are installed before running
To do this I recommend using a [virtual environment](https://virtualenv.pypa.io/en/stable/).
```bash
$ virtualenv -p python3 env
$ source env/bin/activate
$ pip install -r requirements.txt
```
4. Run the script
To do this either drag the exported xml file from step 1 into this root directory and name it `subscriptions.xml` or run the script with this argument
```bash
$ python3 subscribe.py --xml /path/to/xml/file.xml
```
## Limitations
There is a request cap every few hours, I believe the cap is around ~70 subscriptions per few hours. So you may have to run the script several times before being able to fully import everything. I have not yet figured out a way around this.