GithubHelp home page GithubHelp logo

Comments (18)

HaarigerHarald avatar HaarigerHarald commented on August 23, 2024

I can't reproduce it. Can you enable the Logging flag at: https://github.com/HaarigerHarald/android-youtubeExtractor/blob/master/youtubeExtractor/src/main/java/at/huber/youtubeExtractor/YouTubeUriExtractor.java#L35 and post the logs.

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

To change that I have to use the source code? Can I directly from your repository?

from android-youtubeextractor.

HaarigerHarald avatar HaarigerHarald commented on August 23, 2024

I assume you are using android studio with gradle. Just copy the youtubeExtractor directory from the repo sources into your project root directory and replace the original dependency with:

compile project(':youtubeExtractor')

After that you can change the logging flag.

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

@HaarigerHarald

add directory from the repo sources into "MyProject\app\src"
add line in settings.gradle include ':youtubeExtractor'
add line in build.gradle (module: app) compile project(":youtubeExtractor")

Error:Configuration with name 'default' not found.

from android-youtubeextractor.

HaarigerHarald avatar HaarigerHarald commented on August 23, 2024

I think it should be in the "MyProject" root directory. I think the error means that it can't find the build.gradle file of the library.

Alternatively you can clone the repo, enable the logging flag and run the tests. If there is something wrong, one of them should fail.

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

Ok add directory. I don't log visible download lnk


generate_lnk = (Button)view.findViewById(R.id.generate_yt);
        generate_lnk.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //String youtubeLnk = lnk_yt.getText().toString();

                //String youtubeLnk = "https://www.youtube.com/watch?v=qy54tU4KTs0";
                String youtubeLnk = "https://www.youtube.com/watch?v=yRCznT1dEk8";

                Log.d("TTTAG", "ASDDD + " + youtubeLnk);

                YouTubeUriExtractor ytEx = new YouTubeUriExtractor(null) {
                    @Override
                    public void onUrisAvailable(String videoId, String videoTitle, SparseArray<YtFile> ytFiles) {
                        if (ytFiles != null) {
                            int itag = 22;
                            String downloadUrl = ytFiles.get(itag).getUrl();

                            Log.d("YTasdasd", "down_yt = " + downloadUrl);
                        }
                    }
                };

                ytEx.execute(youtubeLnk);
            }
        });


Android Monitor :

09-19 22:33:31.582 24147-24147/com.example.manie.myapplication D/TTTAG: ASDDD + https://www.youtube.com/watch?v=yRCznT1dEk8
09-19 22:33:31.601 24147-25163/com.example.manie.myapplication W/System: ClassLoader referenced unknown path: /system/framework/tcmclient.jar
09-19 22:33:33.312 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:137
09-19 22:33:33.315 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:248
09-19 22:33:33.316 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:136
09-19 22:33:33.317 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:247
09-19 22:33:33.318 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:135
09-19 22:33:33.319 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:244
09-19 22:33:33.321 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:134
09-19 22:33:33.323 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:243
09-19 22:33:33.325 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:133
09-19 22:33:33.327 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:242
09-19 22:33:33.328 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:160
09-19 22:33:33.329 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:278
09-19 22:33:33.330 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:140
09-19 22:33:33.331 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:171
09-19 22:33:33.339 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:249
09-19 22:33:33.354 24147-24156/com.example.manie.myapplication W/art: Suspending all threads took: 6.592ms
09-19 22:33:33.357 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:250
09-19 22:33:33.363 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:251
09-19 22:33:33.369 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:22
09-19 22:33:33.370 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:43
09-19 22:33:33.372 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:18
09-19 22:33:33.374 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:36
09-19 22:33:33.376 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:17
09-19 22:33:33.377 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher signatures
09-19 22:33:34.184 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher FunctURL: https://s.ytimg.com/yts/jsbin/player-pl_PL-vfljfBMmG/base.js
09-19 22:33:34.187 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher Functname: Ey
09-19 22:33:34.200 24147-25163/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher Function: var Ey=function(a){a=a.split("");Dy.ej(a,26);Dy.Sa(a,3);Dy.ej(a,16);Dy.zF(a,20);Dy.Sa(a,3);Dy.ej(a,46);Dy.Sa(a,2);Dy.ej(a,45);return a.join("")};var Dy={Sa:function(a,b){a.splice(0,b)}, ej:function(a){a.reverse()}, zF:function(a,b){var c=a[0];a[0]=a[b%a.length];a[b]=c}};

from android-youtubeextractor.

HaarigerHarald avatar HaarigerHarald commented on August 23, 2024

Interessting, this seems to be a problem with the javascript library or the webview on your device, since everything up to that point works fine. Did you run it on your phone/tablet or within the emulator?

And are there any other logs regarding the webview visible?

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

I run on phone (Sony Xperia Z3 Android 6). Other logs don't view webview

Youtube lnk = "https://www.youtube.com/watch?v=qy54tU4KTs0"
Log : ```

09-20 15:01:18.088 19077-19077/com.example.manie.myapplication W/System: ClassLoader referenced unknown path: /data/app/com.example.manie.myapplication-2/lib/arm
09-20 15:01:18.268 19077-19131/com.example.manie.myapplication D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-20 15:01:18.326 19077-19131/com.example.manie.myapplication I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
OpenGL ES Shader Compiler Version: E031.29.00.00
Build Date: 04/04/16 Mon
Local Branch: mybranch19053788
Remote Branch: quic/LA.BF.1.1.3_rb1.12
Local Patches: NONE
Reconstruct Branch: NOTHING
09-20 15:01:18.330 19077-19131/com.example.manie.myapplication I/OpenGLRenderer: Initialized EGL, version 1.4
09-20 15:01:18.555 19077-19077/com.example.manie.myapplication I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@74c5b08 time:32805772
09-20 15:01:22.745 19077-19077/com.example.manie.myapplication W/PathParser: Points are too far apart 4.000000596046461
09-20 15:01:23.672 19077-19077/com.example.manie.myapplication W/PathParser: Points are too far apart 4.000000596046461
09-20 15:01:24.593 19077-19077/com.example.manie.myapplication D/TTTAG: ASDDD + https://www.youtube.com/watch?v=qy54tU4KTs0
09-20 15:01:24.608 19077-19846/com.example.manie.myapplication W/System: ClassLoader referenced unknown path: /system/framework/tcmclient.jar
09-20 15:01:25.345 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:22
09-20 15:01:25.347 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:43
09-20 15:01:25.349 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:18
09-20 15:01:25.351 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:36
09-20 15:01:25.352 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:17
09-20 15:01:25.355 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:136
09-20 15:01:25.357 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:135
09-20 15:01:25.360 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:134
09-20 15:01:25.362 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:133
09-20 15:01:25.364 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:160
09-20 15:01:25.366 19077-19846/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:140
09-20 15:01:25.368 19077-19077/com.example.manie.myapplication D/YTasdasd: down_yt = https://r2---sn-5uh5o-f5fs.googlevideo.com/videoplayback?itag=22&id=o-AEG7JTMmUhThB4FcZP7Uyh2p8e7siLf-dMubWBzHuakX&mt=1474375691&initcwndbps=1147500&ip=188.146.46.145&key=yt6&pl=15&lmt=1471967456178280&source=youtube&signature=197B731D57419A042564B1876E327EA949D12B5F.3E554BDCC56ABB6045239EB6E3DC2E559D57198C&dur=233.151&mv=m&ratebypass=yes&mm=31&ms=au&expire=1474398086&mime=video%2Fmp4&requiressl=yes&upn=2HIW2HfYpQk&mn=sn-5uh5o-f5fs&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0



Youtube lnk = "https://www.youtube.com/watch?v=pbOw-Hs6LSM"
Log : ```
09-20 15:11:28.686 29664-29664/com.example.manie.myapplication D/TTTAG: ASDDD + https://www.youtube.com/watch?v=pbOw-Hs6LSM
09-20 15:11:28.705 29664-3499/com.example.manie.myapplication W/System: ClassLoader referenced unknown path: /system/framework/tcmclient.jar
09-20 15:11:30.707 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:22
09-20 15:11:30.708 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:43
09-20 15:11:30.710 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:18
09-20 15:11:30.711 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:36
09-20 15:11:30.712 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:17
09-20 15:11:30.714 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:137
09-20 15:11:30.715 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:248
09-20 15:11:30.717 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:136
09-20 15:11:30.718 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:247
09-20 15:11:30.720 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:135
09-20 15:11:30.721 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:244
09-20 15:11:30.722 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:134
09-20 15:11:30.723 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:243
09-20 15:11:30.724 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:133
09-20 15:11:30.726 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:242
09-20 15:11:30.727 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:160
09-20 15:11:30.728 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:278
09-20 15:11:30.729 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:140
09-20 15:11:30.730 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:171
09-20 15:11:30.731 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:249
09-20 15:11:30.732 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:250
09-20 15:11:30.734 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Itag found:251
09-20 15:11:30.735 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher signatures
09-20 15:11:32.142 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher FunctURL: https://s.ytimg.com/yts/jsbin/player-pl_PL-vfljfBMmG/base.js
09-20 15:11:32.151 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher Functname: Ey
09-20 15:11:32.178 29664-3499/com.example.manie.myapplication D/YouTubeUriExtractor: Decipher Function: var Ey=function(a){a=a.split("");Dy.ej(a,26);Dy.Sa(a,3);Dy.ej(a,16);Dy.zF(a,20);Dy.Sa(a,3);Dy.ej(a,46);Dy.Sa(a,2);Dy.ej(a,45);return a.join("")};var Dy={Sa:function(a,b){a.splice(0,b)}, ej:function(a){a.reverse()}, zF:function(a,b){var c=a[0];a[0]=a[b%a.length];a[b]=c}};

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

I've added to your code showing download url :
`

if (curJsFileName != null) {
mat = patEncSig.matcher(stream);
if (mat.find()) {
encSignatures.append(itag, mat.group(1));
}
}
mat = patUrl.matcher(encStream);
String url = null;
if (mat.find()) {
url = mat.group(1);

        if (url != null) {
            Meta meta = META_MAP.get(itag);
            String finalUrl = URLDecoder.decode(url, "UTF-8");
            Log.d("Itag url : ", finalUrl);
            YtFile newVideo = new YtFile(meta, finalUrl);
            ytFiles.put(itag, newVideo);
        }`

Log url lnk is not signatures example https://www.youtube.com/watch?v=pbOw-Hs6LSM
http://wklej.org/id/2857357/

Other video is ok example https://www.youtube.com/watch?v=qy54tU4KTs0
http://wklej.org/id/2857356/

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

I found the cause of this error. When at get_video_info the parameter use_cipher_signature = true you don't download the video.

jeckman/YouTube-Downloader#9
ytdl-org/youtube-dl#897
http://api.gitnol.com/
http://ytapi.gitnol.com/
http://api.w3hills.com/ytcipher

from android-youtubeextractor.

HaarigerHarald avatar HaarigerHarald commented on August 23, 2024

Signature enciphered videos basically contain a signature that has to be "scrambled up" to produce a working link. The scramble up functions are defined in the player JavaScript file. So to produce a working link we need to run this javascript code. The logs suggest that the JavaScript library which uses the webview fails to run correctly. I suspect there is something wrong with the webview of your device. Can you try running it within an emulator, if that works we would at least know that it's device specific.

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

All my devices problems is the same.

But when I installed the application "advancedDownloader" on your phone, it all works properly.

from android-youtubeextractor.

HaarigerHarald avatar HaarigerHarald commented on August 23, 2024

Are you using proguard?

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

@HaarigerHarald
No, but I also tried to use the file "proguard.cfg" in your application AdvacedDownlaoder and still the same.

from android-youtubeextractor.

sunilsunny565 avatar sunilsunny565 commented on August 23, 2024

I just tested the youtube link you have given.And it's working just fine .This is the download link https://r1---sn-h557snlz.googlevideo.com/videoplayback?ms=au&gcr=in&ip=117.247.187.194&mt=1474523950&mv=m&source=youtube&initcwndbps=157500&id=o-AAROYF009wSaaqiuGoZpftl06yH44lms1VkydFDNgFek&mm=31&mn=sn-h557snlz&nh=IgpwcjAyLm1hYTAzKg03Mi4xNC4yMTEuMTEz&expire=1474546026&sparams=dur%2Cei%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&mime=video%2Fmp4&key=yt6&dur=204.149&lmt=1474108027869603&ratebypass=yes&itag=22&requiressl=yes&upn=VkH7U0ozDM0&ipbits=0&ei=CnXjV8PPMsf8oAPqmoiICA&pl=24&signature=7FD5DE99A25A43D2A7C78CCED6EEE247660D35BA.7EA2F83E502406512934DB1408669ABFDA4C9BCD .

Just add this line.it requires an additional parsing.
ytEx.setParseDashManifest(true);

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

@sunilsunny565
Don't help. You can send me your working on a project where you checked?

@sunilsunny565 Your download url can not open.

from android-youtubeextractor.

maniek1310 avatar maniek1310 commented on August 23, 2024

I'm sorry for the trouble. Already it works was enough to pass Activity class YouTubeUrlExtractor

replace
YouTubeUriExtractor ytEx = new YouTubeUriExtractor(null)
on
YouTubeUriExtractor ytEx = new YouTubeUriExtractor(activity)

I saw a step-by-step how to operate your library and noticed that checks every pass and how it will be null activity don't run js-evaluator.

from android-youtubeextractor.

Esattosoft avatar Esattosoft commented on August 23, 2024

When i am trying to download it is not working please help me

W/System.err: java.io.FileNotFoundException: https://r8---sn-2uja-aixr.googlevideo.com/videoplayback?sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&fexp=23709359&ipbits=0&itag=22&ei=3l42W_bGMtrWVJfCvfAC&mt=1530289845&ip=39.37.169.35&lmt=1513401100508280&expire=1530311486&key=yt6&mime=video%2Fmp4&fvip=4&id=o-ACpzXZaCvSYsdGYX8PNq6lh-bnRdKUqD4MZzTFsf5r4h&c=WEB&mn=sn-2uja-aixr%2Csn-npoeenez&mm=31%2C29&mv=m&ratebypass=yes&source=youtube&ms=au%2Crdu&requiressl=yes&dur=356.821&pl=18&initcwndbps=116250

from android-youtubeextractor.

Related Issues (20)

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.