Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
Add '$' to signature function pattern
Browse files Browse the repository at this point in the history
closes #80
  • Loading branch information
HaarigerHarald committed Mar 14, 2019
1 parent 4016787 commit 0d0f7eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public abstract class YouTubeExtractor extends AsyncTask<String, Void, SparseArr
private static final Pattern patFunction = Pattern.compile("([{; =])([a-zA-Z$_][a-zA-Z0-9$]{0,2})\\(");

private static final Pattern patDecryptionJsFile = Pattern.compile("jsbin\\\\/(player(_ias)?-(.+?).js)");
private static final Pattern patSignatureDecFunction = Pattern.compile("(\\w+)\\s*=\\s*function\\((\\w+)\\).\\s*\\2=\\s*\\2\\.split\\(\"\"\\)\\s*;");
private static final Pattern patSignatureDecFunction = Pattern.compile("([\\w$]+)\\s*=\\s*function\\(([\\w$]+)\\).\\s*\\2=\\s*\\2\\.split\\(\"\"\\)\\s*;");

private static final SparseArray<Format> FORMAT_MAP = new SparseArray<>();

Expand Down Expand Up @@ -299,7 +299,7 @@ private SparseArray<YtFile> getStreamUrls() throws IOException, InterruptedExcep
}
if (LOGGING)
Log.d(LOG_TAG, "Get from youtube page");

getUrl = new URL("https://youtube.com/watch?v=" + videoID);
urlConnection = (HttpURLConnection) getUrl.openConnection();
urlConnection.setRequestProperty("User-Agent", USER_AGENT);
Expand Down

0 comments on commit 0d0f7eb

Please sign in to comment.