Git Product home page Git Product logo

biplobsd / yst Goto Github PK

View Code? Open in Web Editor NEW
45.0 3.0 5.0 746 KB

Transfer/Move YouTube subscriptions from one account to another

Home Page: https://biplobsd.github.io/apps/view/yst.md

License: GNU General Public License v3.0

JavaScript 0.44% Svelte 68.89% TypeScript 29.47% HTML 0.45% CSS 0.75%
channel chrome-extension subscription svelte youtube channel-mover channel-transfer subscriptions-transfer migrate-youtube-subscriptions youtube-subscriptions

yst's Introduction

Youtube Subscriptions Transfer

logo

YouTube Subscriptions Transfer is a browser extension that allows you to transfer or move subscriptions from one account to another using XPath or API. The extension collects a list of channels and enables you to subscribe or unsubscribe to each channel. It interacts with the DOM using xpath and YouTube Data API v3.

Note: When using XPath mode, YST only works when the YouTube webpage language is set to English (US).

Issue: On Mac, popup close when changing webpage. Quick solution: Opening with inspect window when popup open and stay open inspect window.
Read more: #4

Quick tutorial 60 second with the XPath mode

Use case

Long Tutorial (In French Language)

Comment transférer ses abonnements YouTube sur un autre compte
Check out the article on paradoxetemporel.fr
Thanks for the tutorial, Zast

Usage scenario

Case 1 - Sharing with your friend

Suppose you regularly watch YouTube videos, and you are subscribed to many of your favorite YouTube channels. Those channels are really good. Now your friend also wants to follow your subscriptions. Your friend requests you to share all of your YouTube subscriptions with their account. In this case, you can show your entire subscription list to your friend, and they can then subscribe to those channels one by one. In this case, the 'YouTube Subscription Transfer Extension' can help you transfer all of your subscriptions to their account automatically.

Case 2 - Work account to new account

Suppose you are using your personal YouTube account, and you also use an ad blocker in your browser to skip YouTube video ads. Currently, you are posting your videos to your channel. However, in this case, YouTube might block you, possibly in a few days. Now that you are aware of this, you decide to create a new YouTube account to keep your personal and work accounts separate. You want to transfer your work account subscriptions to your new account. You have the option to do this manually, one by one, or you can use the "YouTube Subscription Transfer Extension" to automatically transfer or move them to your new account

Installation

Edge Add-ons Chrome Web Store
Get YST on Microsoft Edge Get YST on Chrome Web Store

Or get the built zip from the release tab. Then follow the instructions in the Load unpacked extensions section. The /dist folder should be considered as the unpacked zip files.

YST has two modes

Below is a comparison:

XPath API
No need to connect an account Need to connect an account
Only works on youtube.com No need to go to any page
Slow on webpage loading API requests, so this is fast

Usages

Using XPath mode (Default)

To use the extension, open the Y (yst) icon from the extension panel. If you are not on the https://www.youtube.com page, click the Open YouTube button.

Options

Wait for the page to load completely and wait for the Ready for accept request signal from the content script. Once connected, the options will look like the screenshot below.

First time view

Data section

In the Data section, you can see how many subscriptions the extension has collected. If you expand the subscriptions, you will see all the channel IDs. You can also add, remove, or update this list and take action from this list.

Data section

Google Takeout

YST now supports importing a Google Takeout ZIP file to import a subscription.csv file in XPath mode. The subscription.csv file contains channel IDs. During the import of the ZIP file, all channel IDs are converted to custom URLs for similarity checks with the YouTube page's subscription list. The conversion process utilizes the YouTube Data API.

Here are the steps to import a Takeout ZIP file:
  1. Go to the Google takeout manager

  2. Click on All YouTube data included, then on Deselect all, then select only subscriptions and click OK.

    Checked subscriptions

  3. Click on Next step and then on Create export.

  4. Wait for the email. You will receive a Google Takeout email containing a link to the ZIP file. Download that ZIP file.

  5. Return to YST, click on Data, and below that, you will find the Takeout import section. Click the Click to choose a ZIP file button here. Then select and choose your takeout.zip file.

    Takeout import

Now, YST will automatically import all channels from the subscription.csv. Afterward, you can proceed with any actions.

Actions

  • Collect channel

    This button will collect all subscriptions from your current active tab on YouTube and save them to the Data section.

  • Subscribe

    This button first collects all of your current subscriptions and compares them with the past data from the Data section. If any of the IDs are present in your current subscriptions, the ID is removed from the subscriptions list.

  • Unsubscribe

    This button first collects your subscriptions and compares them with the past data. If any of the IDs are present in your current subscription list, the ID remains on the list.

  • Stop

    This button will appear when any action is running. You can click it to stop the current task.

The Subscribe and Unsubscribe buttons will only appear when the Subscriptions list is not empty

Actions active

Using API mode

To use the API mode, you first need to switch to API mode. To do that, go to the Settings tab and you will see an option called Select Mode. By default, XPath will be active. Click on API.

API Mode active

Connect your account

Now go to the Home tab and expand the Account section. You will see two connect buttons.

Account empty

Connect your account for the two accounts you want to subscribe or unsubscribe from. On the left side, you will see a radio button. After connecting your channels, choose your primary channel by clicking on the radio button.

Now you will see the Collect Channel button enabled. Click to collect the channel.

Collect channel

After collecting the channel, choose your new account. Then click the subscribe button to transfer the subscription. Now wait and observe the success and failure count.

By default, there is a 500ms delay for every API request. You can adjust this value in the Settings tab.

Configuration

Disable auto XPath remote update

Add REMOTE_DISABLE: true to the Setting/XPath text box and save to disable auto-updating of XPath at the extension popup when opened.

Update XPath value

If the YouTube website updates its site and any XPath value is broken, you can easily update that value by going to the "Settings" tab and selecting the "XPath" option. Now update the XPath values as json format. You need to add REMOTE_DISABLE: true for disabling auto update from project xpath value. Now click save.

Select Mode

  • XPath (Default)

    Manually visit the channel page and perform actions.

  • API

    API mode will use the YouTube Data API v3.

API Delay per request

By default, there is a 500 millisecond delay for every API request. This will not affect the XPath mode. You can change this value in the settings tab.

Development

# install dependencies
npm i

# build files to `/dist` directory
# HMR for extension pages and content scripts
npm run dev

Build

# build files to `/dist` directory
$ npm run build

Load unpacked extensions

Getting Started Tutorial

  1. Open the Extension Management page by navigating to chrome://extensions.
  2. Enable Developer Mode by clicking the toggle switch next to Developer mode.
  3. Click the LOAD UNPACKED button and select the /dist directory.

Example

Setting Up Your Own YouTube Data API

Requirements

  • Extension ID
    Extension ID on about page
    You can find on About page>ID: or after building and importing it to the browser extensions tab.

First, you need to obtain a client ID and API key from the Google Console. Create a project in the Google Cloud Console by visiting https://console.cloud.google.com/projectcreate. Name the project as YST extension and then click Create. Next, enable the YouTube Data API v3 by going to https://console.cloud.google.com/apis/library/youtube.googleapis.com?project=yst-extension and click the Enable button.

Now, configure the consent screen by switching to the OAuth consent screen tab.

OAuth consent screen

OAuth consent screen

1 - OAuth Consent Screen

Select "User Type" as "External."

Save and continue.

Now, input the following details:

  • App name as "YST"
  • User support email as your email.
  • Authorized domains as "chromiumapp.org"
  • Developer contact information as your email

Save and continue.

2 - Scopes

Add the following scopes:

  • .../auth/userinfo.email
  • .../auth/userinfo.profile
  • .../auth/youtube.readonly
  • .../auth/youtube.force-ssl

Scopes

Save and continue.

3 - Test Users

Add the email addresses of your two YouTube accounts as test users. Save and continue.

Your OAuth consent screen is now set up.

Credentials Tab

Go to the Credentials tab and create credentials.

Create credentials

First, select API key. A popup will display with your API key; note it down.

Now, click on the "CREATE CREDENTIALS" button again and select OAuth client ID.

Extension ID on about page
NOTE: <EXTENSION_ID> is your Extension ID, which you can find on About page>ID: or after building and importing it from the browser extensions tab.

Configure the following:

  • Application type as Web application
  • Name as YST OAuth
  • Authorized JavaScript origins as https://<EXTENSION_ID>.chromiumapp.org
  • Authorized redirect URIs as https://<EXTENSION_ID>.chromiumapp.org/provider_cb

Click Create, and a popup will appear with your OAuth client credentials. Note the Client ID.

Setting Google API Credentials

Now we have the API KEY and Client_ID. Here we have two ways to set up these keys. Recommended and easy way is on the setting page.

On Setting page

Google API Console Keys

Click on the settings tab and below you will find the Google API Console Keys section. Fill out your two keys carefully.

On build step

.env.local file

Now, create a .env.local file in the root directory and set your client ID and API key.

## Google API Credentials
VITE_CLIENT_ID=
VITE_API_KEY=

Again, run npm run build and reload the extension from the browser extensions tab.

Related information

Donation

Buy Me A Coffee

yst's People

Contributors

biplobsd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yst's Issues

I can't find the EXTENSION_ID

I follow this guide but i cant find the EXTENSION_ID
https://github.com/biplobsd/yst/blob/main/README.md#setting-up-your-own-youtube-data-api
Says as follows
NOTE: <EXTENSION_ID> is your Extension ID, which you can find after building and importing it from the browser extensions tab.

Configure the following:

Application type as Web application
Name as YST OAuth
Authorized JavaScript origins as https://<EXTENSION_ID>.chromiumapp.org
Authorized redirect URIs as https://<EXTENSION_ID>.chromiumapp.org/provider_cb

Could some one help me find the EXTENSION_ID please

Subscription failed - "Unable to subscribe this channel"

Hi,

Thanks for the wonderful extension, it worked a few months back for me, but today when I tried it for a friend, subscription failed with the error being "Unable to subscribe this channel".

Here's how to reproduce it:

  1. Logged in to a youtube account, from this extension's drop-down menu, hit the "Collect Channel" button;
  2. "Data" were populated;
  3. switched to a new youtube account, re-open the drop-down menu on this new youtube page;
  4. hit the "Subscribe" button, it would then say "Unable to subscribe this channel" to every collected channel.

I'm running version 1.6 in xpath mode, on Chromium (Version 122.0.6261.69, Arch Linux).

Any ways to troubleshoot / debug?

Thanks!

Subscribe doesn't work

Collect is done
but subscribe doesn t work. It s check all channel but never subscribe :(

Cannot import channels

I can collect channel, but tt says "Already subscribed" for every channel when I click Subscribe button and I cannot import them.
Could you check if it still works?

Windows 11
Chrome Version 117.0.5938.150
Language on YouTube: English

On Mac unexpected, closed popup window when changing webpage

A S [email protected], he had reported me for this issue. On this Mac, after starting the Subscribe action, the YST popup closed unexpectedly.

Problem screen record

record.mp4

Quick solution

After opening the popup Right click on the window and stay open inspect window.
Open with Inspect

Environment:

Microsoft Edge Version: 116.0.1938.62
YouTube Sub Transfer Version: 1.5
OS: MAC OS Monterey Version 12.6.7
Screen: 13.3 inch (2560 X 1600)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.