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

Commit

Permalink
added Extraction of Age restricted videos
Browse files Browse the repository at this point in the history
  • Loading branch information
nhCoder committed Jan 7, 2020
1 parent 1659728 commit 5bb0f4b
Show file tree
Hide file tree
Showing 79 changed files with 18 additions and 7 deletions.
Binary file added YoutubeExtractor/app/build/bin/app.apk
Binary file not shown.
Binary file added YoutubeExtractor/app/build/bin/classes.dex
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added YoutubeExtractor/app/build/bin/resources.ap_
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void onExtractionGoesWrong(final ExtractorException e) {


}
}).Extract(edit.getText().toString());
}).useDefaultLogin().Extract(edit.getText().toString());

}
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class YoutubeStreamExtractor extends AsyncTask<String,Void,Void> {




public YoutubeStreamExtractor(ExtractorListner EL) {
this.listener = EL;
Headers.put("Accept-Language", "en");
Expand All @@ -52,6 +53,12 @@ public void setHeaders(Map<String, String> headers) {
Headers = headers;
}

public YoutubeStreamExtractor useDefaultLogin() {
Headers.put("Cookie", Utils.loginCookie);
setHeaders(Headers);
return this;
}

public Map<String, String> getHeaders() {
return Headers;
}
Expand Down Expand Up @@ -159,14 +166,14 @@ private List<YTMedia> parseUrls(YTMedia[] rawMedia) {
String decodedSig = "";
for (String partCipher:media.getCipher().split("&")) {



if (partCipher.startsWith("s=")) {
decodedSig = CipherManager.dechiperSig(URLDecoder.decode(partCipher.replace("s=", "")), response.getAssets().getJs());
}

if (partCipher.startsWith("url=")) {
tempUrl=URLDecoder.decode(partCipher.replace("url=", ""));
tempUrl = URLDecoder.decode(partCipher.replace("url=", ""));

for (String url_part:tempUrl.split("&")) {
if (url_part.startsWith("s=")) {
Expand All @@ -175,11 +182,11 @@ private List<YTMedia> parseUrls(YTMedia[] rawMedia) {
}
}
}

String FinalUrl= tempUrl + "&sig=" + decodedSig;
media.setUrl(FinalUrl);
links.add(media);


} else {
links.add(media);
Expand All @@ -194,7 +201,7 @@ private List<YTMedia> parseUrls(YTMedia[] rawMedia) {
return links;
}





Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

public class Utils {

public static String loginCookie="SID=sQebaLqpbk6gtBslCoKf2QMlnsSGyHZ10Ape5KC4w6A2xNcwmoB-l1xew71X6vvjm4D7Yw.;__Secure-3PSID=sQebaLqpbk6gtBslCoKf2QMlnsSGyHZ10Ape5KC4w6A2xNcwYZWWACA_8IrlbEWauUE_Wg.;HSID=AZIcZ8BttTa33E_1m;SSID=AfAdb5xkm4o5xYY0Y;APISID=mhQXsz03mKxKRJ2a/AFVQUDIGbgnQtpUWj;SAPISID=DyN8WKX8Y8mKkr3w/A9hFkEgGGnKgh5R-Y;__Secure-HSID=AZIcZ8BttTa33E_1m;__Secure-SSID=AfAdb5xkm4o5xYY0Y;__Secure-APISID=mhQXsz03mKxKRJ2a/AFVQUDIGbgnQtpUWj;__Secure-3PAPISID=DyN8WKX8Y8mKkr3w/A9hFkEgGGnKgh5R-Y;CONSENT=YES+en+202001;VISITOR_INFO1_LIVE=4Hp4-x4BFMQ;YSC=bNQ8TA61Fu8;GPS=1;LOGIN_INFO=AFmmF2swRgIhAL6ujtG8K3M0a4xThywxj4q3WGcotlfzfQlB2te4wgwIAiEAihKRgpgxwjvwSoiinpkywMoA6bkm-gWp7pycMJSAwgU:QUQ3MjNmekZ5SGU3YUZhT1NlN3lQcV9hQnY2ZjZuRjRUblpjT09QdEozZ3hQY0ZyN0lkU0tKeURhc2R4b3luR3BUQTQzOVpLNHpjTkxSa1JmVEh5Qll6RVhfT1JEOU9VYTZkV0RobDN1cTJhZEtHV2FYZWt1dUs3TEJUenpGSnlkeFUzdVNIREk0cjVGeGYtU0RDVDR1OXhCTUh6UXlzX3JyN0FRVDhhREM5ZW82M09qWHNXeVFr;SIDCC=AN0-TYs22Wg_H5D4kzTjQgEFunRGQljZGxdNtosqFUrGVHU-qRIHF6PFHovUG9S9pE333EZd";



public static List<YTMedia> filterInvalidLinks(List<YTMedia> urls) {
List<YTMedia> workingLinks=new ArrayList<>();
for (YTMedia media:urls) {
Expand Down

0 comments on commit 5bb0f4b

Please sign in to comment.