haarigerharald / android-youtubeextractor Goto Github PK
View Code? Open in Web Editor NEWDeprecated: Android based YouTube URL extractor and downloader
License: Other
Deprecated: Android based YouTube URL extractor and downloader
License: Other
Proguard rule for the library is missing. The dependency for this project, js-evaluator-for-android, states that users should exclude JavaScriptInterface from proguard.
I opened an issue in upstream project, evgenyneu/js-evaluator-for-android/issues/30. Until it is fixed and packaged to their release, we should add proguard rule temporarily.
idk where is the problem.. some help me?
Hello,
iam using YoutubeExtractor to create a playlist that plays in the background using "service", and i successfully did that, the problem is after couple of hours it seems that the rtsp links expire, and they are not playing anymore and i need to extract the link again and again every day.
Please advice me how to fix the issue.
Thanks.
When the app is uninstalled all the content is being removed. but if I am just updating the application (installing new apk when the app is already installed) the content is being saved. what is the problem?
The .apk
file of the latest release listed here on Github (v1.3.0) identifies itself as v1.1:
package: name='at.huber.youtubeDownloader' versionCode='1' versionName='1.1'
Is that intentional? A bit confusing as one might expect a newer version than already installed, but instead gets error messages from the installer ;)
Hi
I opened an issue today and it was closed by you with a commit but the issue hasn't been resolved. It still gives me ytFiles is null
Thanks
Hi,
Congrats for your work.
I m experimenting issues extracting some kind of videos, like this:
https://www.youtube.com/watch?v=r0bzx8m1l9I
Others videos works perfectly.
Do you know what is happening here?
Thanks,
Is there any javascript based library for this to develop in web. Please mention if you know any. And also did you guys do any iOS projects related to this. @HaarigerHarald and @adelnizamutdinov
Hi it is a good library to download videos from youtube. I would like to know how can I enable the mp3 format? Or do I have tu use some library to convert to mp4 to mp3? Thanks
Would it be possible to implement a way to choose the download location?
Hi,
I just noticed there's an issue with extracting old youtube videos.
For example:
I'm trying to download Timbaland - Apologize (2009) and app crashes,
java.lang.nullpointerexception: Attempt to invoke virtual method 'java.lang.String at.huber.youtubeExtractor.YtFile.getUrl()' on a null object reference
I noticed sometimes the method getStreamUrls()
returned null on some videos. I wanted to know why and so I started by put some breakpoints in order to see why it returned null always on the same videos.
What I discovered is something which sounds very strange, but I want to report it (together with the solution I've found).
The problem is in line 262. Also if ytFiles.size()
is not 0 the check results true and so it returns null
. The point is, for the very same video, when I put a breakpoint on this line the check is always reliable; when I let it go without breakpoints it sees ytFiles.size() = 0
and so returns null
.
Please check this problem with this video:
https://www.youtube.com/watch?v=b6GX0eMi8e4
I solved it by simply commenting the if statement and leaving return ytFiles
. The problem seems to be a synchronization one.
// if (ytFiles.size() == 0) {
// if (LOGGING)
// Log.d(LOG_TAG, streamMap);
// return null;
// }
return ytFiles;
EDIT:
it may be related to this problem
#2
Hi
In some case like slow network, I found the URI is extracted unlike the normal URI "...sn-ipoxu..." but extract out something like:
"https://r3---sn-5hnednel.googlevideo.com ..."
"https://r2---sn-vgqskn7e.googlevideo.com..."
"https://r6---sn-n4v7sn76.googlevideo.com..."
"https://r9---sn-vgqsens7.googlevideo.com..."
"https://s.ytimg.com/yts/swfbin/player-vf..."
"https://www.youtube.com/annotations_invi..."
"https://googleads.g.doubleclick.net/page..."
Any idea why it failed? Can it only play "ipoxu" URI? or it's because incomplete extraction?
hello sir
how to calculate video size in different format
provide any idea
it shows me only"It failed to extract. So sad" even if I used different video ids that work normally on youtube
VideoMeta vMeta;
vMeta.getTitle() returns null for some videos
Hi,
I was using this library in an application and sometimes it gives empty SparseArray in first attempt but on trying again for same video, it gives all the links. I know it sounds weird but it happens a lot of times.
Do you know what could be the problem ?
Thanks!
HI,
I Tried new framework and getting video successfully but after download not getting audio in video. it is faced issue 1024px video file.
Thanks.
Do your library has violated YouTube's terms of service:
C You agree not to access Content through any technology or means other than the video playback pages of the Service itself, the Embeddable Player, or other explicitly authorized means YouTube may designate.
Hi
Since the last 12+hours the library isn't working. ytFiles always returns null.
03-07 23:38:59.902 16995-18036/com.akashpopat W/System.err: java.util.regex.PatternSyntaxException: Incorrectly nested parentheses in regexp pattern near index 13: 03-07 23:38:59.906 16995-18036/com.akashpopat W/System.err: (var |)f.sig):f.s&&k.set(=function\((.{1,3})\)\{) 03-07 23:38:59.910 16995-18036/com.akashpopat. W/System.err: ^ 03-07 23:38:59.918 16995-18036/com.akashpopat. W/System.err: at java.util.regex.Pattern.compileImpl(Native Method) 03-07 23:38:59.923 16995-18036/com.akashpopat. W/System.err: at java.util.regex.Pattern.compile(Pattern.java:411) 03-07 23:38:59.927 16995-18036/com.akashpopat. W/System.err: at java.util.regex.Pattern.<init>(Pattern.java:394) 03-07 23:38:59.932 16995-18036/com.akashpopat. W/System.err: at java.util.regex.Pattern.compile(Pattern.java:381) 03-07 23:38:59.935 16995-18036/com.akashpopat. W/System.err: at at.huber.youtubeExtractor.YouTubeUriExtractor.decipherSignature(YouTubeUriExtractor.java:402) 03-07 23:38:59.939 16995-18036/com.akashpopat. W/System.err: at at.huber.youtubeExtractor.YouTubeUriExtractor.getStreamUrls(YouTubeUriExtractor.java:320) 03-07 23:38:59.948 16995-16995/com.akashpopat. W/Ads: The webview is destroyed. Ignoring action. 03-07 23:38:59.955 16995-18036/com.akashpopat. W/System.err: at at.huber.youtubeExtractor.YouTubeUriExtractor.doInBackground(YouTubeUriExtractor.java:158) 03-07 23:38:59.960 16995-18036/com.akashpopat. W/System.err: at at.huber.youtubeExtractor.YouTubeUriExtractor.doInBackground(YouTubeUriExtractor.java:32) 03-07 23:38:59.963 16995-18036/com.akashpopat. W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295) 03-07 23:38:59.966 16995-18036/com.akashpopat. W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 03-07 23:38:59.970 16995-18036/com.akashpopat. W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 03-07 23:38:59.973 16995-18036/com.akashpopat. W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 03-07 23:38:59.976 16995-18036/com.akashpopat. W/System.err: at java.lang.Thread.run(Thread.java:818)
The audio download works perfectly. But when I download a video, it downloads de audio and video files separately. I would like them combined in one file.
I think I have to do something with the mp4parser but I don't know what.
What code do I have to add and where?
Thanks!
When calling getStreamUrls()
com.android.org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: Certificate not valid until Wed Apr 01 03:00:00 GMT+03:00 2015 (compared to Thu Jan 01 02:54:25 GMT+02:00 1970)
It seems that the certificate is expired.
This is the complete log.
java.io.EOFException
at java.util.zip.GZIPInputStream.readFully(GZIPInputStream.java:206)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:98)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
at libcore.net.http.HttpEngine.initContentStream(HttpEngine.java:547)
at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:850)
at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283)
at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271)
at at.huber.youtubeExtractor.YouTubeUriExtractor.getStreamUrls(YouTubeUriExtractor.java:208)
at at.huber.youtubeExtractor.YouTubeUriExtractor.doInBackground(YouTubeUriExtractor.java:158)
at at.huber.youtubeExtractor.YouTubeUriExtractor.doInBackground(YouTubeUriExtractor.java:32)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Didn't have this issue on other devices though.Will check on more devices.
Hi
I found some Video which is set Age-Constraint cannot be played. For example, following video. Could you check it? I test XCDYouTube which is open source in iOS is able to be played without the constraint, hopefully helpful to your trouble-shooting.
https://www.youtube.com/watch?v=pOmTdFpIDX8
https://www.youtube.com/watch?v=cWeWR_rEy6g
https://www.youtube.com/watch?v=SkRSXFQerZs
https://www.youtube.com/watch?v=GEF1Ah8QaXw
https://www.youtube.com/watch?v=8o4Zj98FeX4
Has YouTube updated something from there side because now the API doesn't work and just give's no links found ?
Please fix ASAP
Format mp4 dash don't have sound. There is any way to get the audio?
Are you sure your library ain't violating youtube's t&c? Is it fine (legally) to use this app for accessin' youtube videos offline?
Extraction not working anymore. I think YouTube changed the way they generate video stream URLs.
I cannot get urls for 1080p videos.
Also, I cannot see any itag value for 1080p mp4 quality in the youtubeFiles array.
Thank you for reading.I got a problem,when the url is "https://m.youtube.com/watch?v=plJTJKoPAZk" or "https://m.youtube.com/watch?v=GIsJCwuicRc","https://m.youtube.com/watch?v=r_-kHSJtk38"...
In decipherSignature function,the String decipherFunctUrl = "https://s.ytimg.com/yts/jsbin/" + decipherJsFileName;decipherJsFileName is always null.
Have you meet the same problem?Thank you!
I'm new in android. After runing a specific module app, it's installing in phone but activity not starting. What's wrong? Is there any hidden rule for building multiple module project?
The url extraction for different qualities is working fine. However, when i try to play that link in browser
or in Android app in exo player, it has no sound.
e.g,
Video_Link
Hi Haariger,
Can you please add API function to enable debug mode which would print all the log statements ?
May be : public void enableLogging(boolean enable);
It would make debugging easier in downstream projects :)
If you ain't free, then I can make a pull request for that.
Regards,
Ashish Bansal
My exceptional url is = https://www.youtube.com/watch?v=Y-Xlc3OY_zg
My download code is in recycleradapter.
here is my logcat
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String at.huber.youtubeExtractor.YtFile.getUrl()' on a null object reference
at com.bicubic.botadnews.adapter.RvHomeAdapter$NewsHolder$2.onUrisAvailable(RvHomeAdapter.java:242)
at at.huber.youtubeExtractor.YouTubeUriExtractor.onPostExecute(YouTubeUriExtractor.java:133)
at at.huber.youtubeExtractor.YouTubeUriExtractor.onPostExecute(YouTubeUriExtractor.java:32)
at android.os.AsyncTask.finish(AsyncTask.java:636)
at android.os.AsyncTask.access$500(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5268)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697)
Hi,
can someone help me to add Interstitial code in Youtube Extractor,
Hi, HaarigerHarald,
Thanks for your implementation of youtubeExtractor. This is a very useful module for me. But here is a problem that it cannot extract correct dash MPD URL if URL is ciphered. Would you please take a look on this issue. Thank you.
source code is v1.5.0, @ rev. SHA-1: 3933c69
[my configuration]
youtubeLink = "http://youtube.com/watch?v=FD1n3SSKVcY";
parseDashManifest = true;
[result]
getStreamUrls()::YouTubeUriExtractor cannot get correct dashMpdUrl.
Error:(52, 13) Failed to resolve: com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT
Show in File
Show in Project Structure dialog
Failed to resolve: com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT
can't get sound when download video in 1080p
I built an audio extract app using this youtubeExtractor(6/25/2016) library.
But suddenly the app can't extract audio since few days before. sometimes the app can be extracted one of few YouTube files.
Help me, please.
Thank you.
I'm unable to locate exactly what I have to do in order to download the mp3 file. I read and noticed that you have to first download m4a and then do local conversio. But how to download m4a? Thanks in advance
I've just downloaded https://github.com/HaarigerHarald/android-youtubeExtractor/releases/download/v1.5.0/advancedDownloader-release.apk
which should be v1.5, but it claims to be v1.4:
package: name='at.huber.youtubeDownloader' versionCode='2' versionName='1.4'
Just as a note (you might wish to fix and replace it ;)
Hi,
I have a problem with generating this video: https://www.youtube.com/watch?v=pbOw-Hs6LSM
public void onUrisAvailable(String videoId, String videoTitle, SparseArray ytFiles) {
ytFiles is null
Other video generates properly.
Really appreciate this code, have used it in our app and it is truly awesome. Need a fix - URL for Vevo-like videos are no longer extractable. It would be great to have this fixed so we can extract URLs for vevo-like videos with signatures which is crucial for our work. If you can point to code snippets to accomplish that, that'd be great too.
thanks again for this great code. Fantastic work.
I'm having this error
Error:(74, 13) Failed to resolve: com.github.HaarigerHarald:android-youtubeExtractor:-SNAPSHOT
Show in File
Show in Project Structure dialog
what's the fix?
When will library on RxJava?
Hi, HaarigerHarald,
Thanks for your implementation of youtubeExtractor.
I'm using Google ExoPlayer to play video, but I just only get Sample YouTube DASH video on Internet.
Is it possible to use your youtubeExtractor to get YouTube video DASH URL from YouTube video URL?
Hi, extract video is always slow, suggest provide AsyncTask#executeOnExecutor to extract video.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.