Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import Youtube subscription #1753

Closed
2 of 3 tasks
ghost opened this issue Sep 22, 2018 · 17 comments
Closed
2 of 3 tasks

Can't import Youtube subscription #1753

ghost opened this issue Sep 22, 2018 · 17 comments

Comments

@ghost
Copy link

ghost commented Sep 22, 2018

After downloading the xml file from the subscription manager and trying to import it, it displays an error saying "Could not import subscriptions, invalid file/content source

@f1vefour
Copy link

I tried on three different devices and previous revisions of NewPipe, I can no longer import my subscriptions either.

@sapher
Copy link

sapher commented Sep 25, 2018

Not working for me either

@sensiblepuffin
Copy link

I tried again just now and it worked. Fairly certain nothing changed between now and when I initially noticed this problem, though.

@f1vefour
Copy link

f1vefour commented Sep 27, 2018

I figured it out.

If you try importing your export from:

Subscriptions > Import from > Previous export

It fails.

If you import from:

Subscriptions > Import from > YouTube > IMPORT FILE

It succeeds.

@ghost
Copy link

ghost commented Sep 27, 2018

@f1vefour

If you import from:
Subscriptions > Import from > YouTube > IMPORT FILE
It succeeds.

No,it doesn't. Not for me, anyway. I just checked for updates in f-droid (none) and tried again. Still fails.

@theScrabi
Copy link
Member

@mauriciocolli could you please take a look at this?

@jnihil
Copy link

jnihil commented Oct 1, 2018

I figured it out.

If you try importing your export from:

Subscriptions > Import from > Previous export

It fails.

If you import from:

Subscriptions > Import from > YouTube > IMPORT FILE

It succeeds.

Yup. That worked for me too.
Thanks for the tip.

@ghost
Copy link

ghost commented Oct 1, 2018

I exported it from Brave (not the YouTube app) and it worked this way.

@WWWWWWMWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
Copy link

I wasn't using the app because of this broken feature, but the problem seems to be with downloading it from mobile, somehow.

What fixed it for me was using the same link they give you https://www.youtube.com/subscription_manager?action_takeout=1

but opening it on my computer, then putting it on my phone and loading it on the app. It worked this way.

@sulyniv
Copy link

sulyniv commented May 2, 2019

I wasn't using the app because of this broken feature, but the problem seems to be with downloading it from mobile, somehow.

What fixed it for me was using the same link they give you https://www.youtube.com/subscription_manager?action_takeout=1

but opening it on my computer, then putting it on my phone and loading it on the app. It worked this way.

This worked for me, thanks a lot!

@cuilean
Copy link

cuilean commented Jun 20, 2019

I figured it out.

If you try importing your export from:

Subscriptions > Import from > Previous export

It fails.

If you import from:

Subscriptions > Import from > YouTube > IMPORT FILE

It succeeds.

thanks bro it worked!

@Stypox
Copy link
Member

Stypox commented Jun 20, 2019

I think this issue should be closed since it was fixed in TeamNewPipe/NewPipeExtractor#160

@Stypox Stypox closed this as completed Aug 28, 2019
@Peskoo
Copy link

Peskoo commented Sep 1, 2019

I wasn't using the app because of this broken feature, but the problem seems to be with downloading it from mobile, somehow.

What fixed it for me was using the same link they give you https://www.youtube.com/subscription_manager?action_takeout=1

but opening it on my computer, then putting it on my phone and loading it on the app. It worked this way.

Thansk for the tip. It works fine for me.

@dducro
Copy link

dducro commented Nov 5, 2019

Downloaded the xml file on mac and tried to import it, but it's not working.
Version 0.17.4

@Stypox
Copy link
Member

Stypox commented Nov 5, 2019

@dducro please open a new issue and provide more information. It would greatly help debugging if you could provide the failing xml file (feel free to truncate personal information) ;-)

@dducro
Copy link

dducro commented Nov 5, 2019

#2784 Thanks! :)

@shoukry1
Copy link

Only way I got around it is the following...

TLDR;
Export from Google is CSV
Convert into NewPipe export/import style JSON
Export from NewPipe to know requirements and to use JSON skeleton
Convert CSV record into JSON objects and place them within the subscriptions array element within the NewPipe JSON export
Then finally import that frankenstein JSON file into NewPipe as "Previous export" instead of "YouTube"


Instructions to export from Google/YouTube are to be slightly revised:

  1. Go to the Google Takeout Manager.
  2. Log in if asked.
  3. In the "Google Takeout" page, find the "CREATE A NEW EXPORT" section
  4. In the "Products" sub-section, Click "Deselect all" to deselect all Google products
  5. Scroll all the way down in the Products list to "YouTube"
  6. Select "Youtube and Youtube Music" by checking the checkbox right next to it
  7. Two sub-options will appear:
  • "Multiple formats"
  • "All YouTube data included"
  1. Click on "All YouTube data included"
  2. A checklist pop-up will appear "YouTube and YouTube Music content options"
  3. Click on "Deselect all" to deselect all content options in the checklist pop-up
  4. Scroll down to find "subscriptions"
  5. Only select that option by checking the checkbox right next to it
  6. Click "Ok"
  7. Click "Next step"
  8. In the "Choose file type, frequency & Destination" section, choose the following:
  • Frequency: "Export once"
  • File type & size: ".zip"
  1. Click "Create export"
  2. Login if needed
  3. Wait for the "Download" button to appear and click it
  4. Once downloaded, extract the zip file and go down the directory tree as follows:
  • Takeout
  • YouTube and YouTube Music
  • subscriptions
  1. You should find a "subscriptions.csv" file (NOT a JSON file as the current instructions expect)
  2. Now, for me, I opened that file and tried a few things. Tried using the headers and the data to transform the CSV file into JSON and import it, the app did not like that
  3. So I exported my current subscriptions from NewPipe (Doesn't matter if you don't have any yet) (Menu -> Subscriptions -> Expand Subscriptions -> Export to: File)
  4. The NewPipe export is in JSON format and will have the following JSON fields:
  • app_version
  • app_version_int
  • subscriptions
  1. The subscriptions field will be an array
  2. Each JSON object within the subscriptions array appears to have the following fields:
  • service_id
  • url
  • name
  1. The fields have different names than the CSV headers exported from Google Takeout
  2. Seems like the service_id field always has a value of 0 in my case (app_version="0.21.9", app_version_int=975)
  3. So I used excel to quickly transform the values I exported into a JSON array that looks like what NewPipe expects
  4. The CSV export has 3 columns (in Excel, occupied columns A, B & C), with the headers "Channel Id", "Channel Url" & "Channel Title" respectively occupying row 1
  5. I placed the following formula in cell D2:
=CONCATENATE("{""service_id"": 0,""url"":""", $B2, """,""name"":""", $C2, """},")
  1. I then copied that formula all the way down till the end of the Excel sheet (CSV opened in Excel)
  2. Now that we have a JSON object per row of data, I copied column D and pasted it into a text editor
  3. I used VSCode, feel free to use your favorite as long as it can format JSON for you and validate it's a proper JSON file before you use it
  4. I surrounded my list of JSON objects with the skeleton I exported from NewPipe earlier in step 21
  5. Then removed the trailing comma (resulting from the formula used in Excel) and made sure the array closure ] is in place
  6. For example:
{
  "app_version": "0.21.9",
  "app_version_int": 975,
  "subscriptions": [
      {
          "service_id": 0,
          "url": "http://www.youtube.com/channel/UC-lHJZR3Gqxm24_Vd_AJ5Yw",
          "name": "PewDiePie"
      }
  ]
}
  1. After formatting the JSON file and validating it has no JSON errors. I then imported it into NewPipe as a "Previous export" instead of "YouTube" (Menu -> Subscriptions -> Expand Subscriptions -> Import from: Previous export)

Worked like a charm...
Apologies for the very long comment, but I wanted to be thorough for any users who aren't familiar with the app or JSON and whatnot

I'll try to whip-up a quick converter from the Google CSV to the NewPipe JSON if I have some spare time. Should be pretty simple if anyone else wants to give it a go.
This way you won't need to go through steps 20 - 34 and it would be automated instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests