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

Heads up, YouTube discontinuing older version on desktop soon #258

Closed
yausername opened this issue Feb 17, 2020 · 12 comments · Fixed by #261
Closed

Heads up, YouTube discontinuing older version on desktop soon #258

yausername opened this issue Feb 17, 2020 · 12 comments · Fixed by #261
Labels
ASAP Issue needs to be fixed as soon as possible youtube service, https://www.youtube.com/

Comments

@yausername
Copy link
Contributor

This might affect us.

Enter 2020 and the older versions are missing many of the new features and design improvements we’ve introduced over the past 3 years, including top requests based on your feedback (see most recent update here). That's why the older version will be going away in March and you'll only be able to access newer desktop versions to enjoy the best of YouTube.

https://support.google.com/youtube/thread/27596769

@TobiGr TobiGr added ASAP Issue needs to be fixed as soon as possible youtube service, https://www.youtube.com/ labels Feb 17, 2020
@TobiGr
Copy link
Contributor

TobiGr commented Feb 17, 2020

Uuh f***. We need to switch to the new version asap. I guess the best way is to create a new branch and switch the user agent and then fix everything which seems to be broken.

@TobiGr
Copy link
Contributor

TobiGr commented Feb 17, 2020

Which user agent is the best to use?

@TobiGr
Copy link
Contributor

TobiGr commented Feb 17, 2020

Using Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/73.0 changes everything...
Most info about the current video or channel is stored in window["ytInitialData"].
I have created a new branch: yt_new.

@B0pol
Copy link
Member

B0pol commented Feb 18, 2020

How do you read the json file?
Firefox says json has errors, and shows nothing (it worked well for Peertube json files)
For the YoutubeStreamExtractor, I used this website, it said it has error but was still formatting
But for the channelExtractor, it says it has too many errors and it can't format it.

So do you have any tips or you are reading the unformatted file?

@wb9688
Copy link
Contributor

wb9688 commented Feb 18, 2020

@B0pol: I could read the JSON file perfectly fine. Anyway, I'm already working on it.

@TobiGr
Copy link
Contributor

TobiGr commented Feb 18, 2020

@B0pol I've zipped most important sites: documents.zip

@B0pol
Copy link
Member

B0pol commented Feb 18, 2020

perfect, thank you

@B0pol
Copy link
Member

B0pol commented Feb 18, 2020

Ok I found why it bugged:
the files I got written didn't include the quotes "
What i did was:

createFile("yt_new/initialData.json", extractor.getPlayerResponse().toString());
with createFile:

public static void createFile(String path, String content) throws IOException {
    BufferedWriter writer = new BufferedWriter(new FileWriter(path));
    writer.write(content);
    writer.flush();
    writer.close();
}

I read nanojson git and the proper way to do it isn't an instance of JsonObject.toString(), but
String json = JsonWriter.string(JsonObject or JsonArray);

@TobiGr
Copy link
Contributor

TobiGr commented Feb 25, 2020

@Poolitzer Do you have time to prepare a blog post? We are preparing a new release to address this before everything stops working.

@Poolitzer
Copy link
Member

Always

@B0pol
Copy link
Member

B0pol commented Apr 13, 2020

It's april and old youtube is still available by adding &app=desktop in url :o

@Poolitzer
Copy link
Member

How dare they tricking us into using their new version which offers way more features like those fancy new feed streams and stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP Issue needs to be fixed as soon as possible youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants