Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Youtube cannot be play or extracted #41

Open
schlector-code opened this issue Nov 23, 2020 · 16 comments
Open

Youtube cannot be play or extracted #41

schlector-code opened this issue Nov 23, 2020 · 16 comments

Comments

@schlector-code
Copy link

Since Yesterday YouTube cannot play, can you take a look at it with priority?

@nhCoder
Copy link
Owner

nhCoder commented Nov 23, 2020

I will look into it tonight

@craftbox2245
Copy link

Error : While getting YouTube Data: Attempt to invoke virtual method 'int java.lang.String.lenght()' on a null object reference
YouTube can not extracted
Please Help us as soon as possible @nhCoder

@nhCoder
Copy link
Owner

nhCoder commented Nov 24, 2020

its works now IDK but it works please check and tell me again

@schlector-code
Copy link
Author

its works now IDK but it works please check and tell me again
No, it still not working, failing with number of videos like Vevo videos.

@hhyeok1026

This comment has been minimized.

@NiazSagor
Copy link

@hhyeok1026 hello. thank you for your updated code and I have made changes on the code according to your code. But the error is still there. can you suggest anything?

@nhCoder
Copy link
Owner

nhCoder commented Nov 26, 2020

@hhyeok1026 hello. thank you for your updated code and I have made changes on the code according to your code. But the error is still there. can you suggest anything?

hey no need to modify anything the original code is working

@NiazSagor
Copy link

@nhCoder sorry brother, it's still not working. strange though, it was working just fine since I have implemented it. I did not change anything but the error just landed out of no where. I do not know what to do. I have a project that heavily depends on this.

@nhCoder
Copy link
Owner

nhCoder commented Nov 26, 2020

just check the apk for test and tell me again

@schlector-code
Copy link
Author

schlector-code commented Nov 26, 2020

@nhCoder Please check with other YouTube video like VEVO videos, it is more likely to fell in the problem. and Test with different device.

@nhCoder
Copy link
Owner

nhCoder commented Nov 26, 2020

@nhCoder Please check with other YouTube video like VEVO videos, it is more likely to fell in the problem. and Test with different device.

please send me the links

@hhyeok1026

This comment has been minimized.

@hhyeok1026

This comment has been minimized.

@hhyeok1026

This comment has been minimized.

@NiazSagor
Copy link

@hhyeok1026 thank you for the code. now what I have faced, some urls are working and some are not.

some of the links that are not working
1WEk-ecKW00
Fmcwap9uwLI
P0ysy7Bwjy0

some links that are working
kpmsdqQwNW8

I am confused about how to deal with the problem. How to know for sure which links are going to work and which are not.

The error :

2020-11-27 15:25:29.991 29442-29442/com.angik.exoplayer I/Sagor: Error While getting Youtube Data:java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at java.io.StringReader.<init>(StringReader.java:50) at com.google.gson.JsonParser.parseString(JsonParser.java:47) at com.google.gson.JsonParser.parse(JsonParser.java:98) at com.angik.exoplayer.YoutubeStreamExtractor.parseJson(YoutubeStreamExtractor.java:145) at com.angik.exoplayer.YoutubeStreamExtractor.doInBackground(YoutubeStreamExtractor.java:111) at com.angik.exoplayer.YoutubeStreamExtractor.doInBackground(YoutubeStreamExtractor.java:29) at android.os.AsyncTask$2.call(AsyncTask.java:333) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

@hhyeok1026
Copy link
Contributor

hhyeok1026 commented Nov 27, 2020

@NiazSagor

I will check the video.
I posted a commit. Check it out. #42
After checking the video above, if there is no problem, I will do a pull request.

//
The above 4 videos,
I checked it in my modified program.
I found itag 140, all worked fine.

//
It seems that there are 3 cases as the body value that was responded to the request.

"case1" - Structure applied to the original.
"case2" - Structure applied by my modifications.
"case3" - Case where both 1 and 2 coexist

So I checked if I could bring it to number 1 first, and if it didn't, I made it to number 2.

The above cases may be different for each video, on a specific device.
I saw a case that "case1" was changed to "case2" and "case1" was no longer visible on the device.
When I first analyzed this issue, I saw "case3".
Now almost "case2" is visible.

//
p.s. In the code I posted earlier,
I found another case in the regex and modified it a bit.

nhCoder added a commit that referenced this issue Dec 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants