From e072bf6461b29520fecd43635c34f709b8a0574d Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Thu, 14 Mar 2019 08:49:11 +0100 Subject: [PATCH] fix dercrypt error due to wrong dollar sign detection --- .../services/youtube/extractors/YoutubeStreamExtractor.java | 4 ++-- .../services/youtube/YoutubeChannelExtractorTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java index 4b21a06ae..d61bcdc1d 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java @@ -34,7 +34,7 @@ import java.util.*; /* * Created by Christian Schabesberger on 06.08.15. * - * Copyright (C) Christian Schabesberger 2018 + * Copyright (C) Christian Schabesberger 2019 * YoutubeStreamExtractor.java is part of NewPipe. * * NewPipe is free software: you can redistribute it and/or modify @@ -571,7 +571,7 @@ public class YoutubeStreamExtractor extends StreamExtractor { private static final String VERIFIED_URL_PARAMS = "&has_verified=1&bpctr=9999999999"; private final static String DECYRYPTION_SIGNATURE_FUNCTION_REGEX = - "(\\w+)\\s*=\\s*function\\((\\w+)\\)\\{\\s*\\2=\\s*\\2\\.split\\(\"\"\\)\\s*;"; + "([\\w$]+)\\s*=\\s*function\\((\\w+)\\)\\{\\s*\\2=\\s*\\2\\.split\\(\"\"\\)\\s*;"; private final static String DECRYPTION_AKAMAIZED_STRING_REGEX = "yt\\.akamaized\\.net/\\)\\s*\\|\\|\\s*.*?\\s*c\\s*&&\\s*d\\.set\\([^,]+\\s*,\\s*(:encodeURIComponent\\s*\\()([a-zA-Z0-9$]+)\\("; private final static String DECRYPTION_AKAMAIZED_SHORT_STRING_REGEX = diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractorTest.java index efa8cbbea..f124bed7c 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeChannelExtractorTest.java @@ -323,7 +323,7 @@ public class YoutubeChannelExtractorTest { @Test public void testName() throws Exception { - assertEquals("CaptainDisillusion", extractor.getName()); + assertEquals("Captain Disillusion", extractor.getName()); } @Test