Merge pull request #551 from FireMasterK/ff-privacy

Change UA to privacy.resistFingerprinting.
This commit is contained in:
Tobi 2021-03-24 17:58:34 +01:00 committed by GitHub
commit 12835bfae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 75 additions and 86 deletions

View File

@ -34,7 +34,7 @@ import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
public class YoutubeCommentsExtractor extends CommentsExtractor {
// using the mobile site for comments because it loads faster and uses get requests instead of post
private static final String USER_AGENT = "Mozilla/5.0 (Android 8.1.0; Mobile; rv:62.0) Gecko/62.0 Firefox/62.0";
private static final String USER_AGENT = "Mozilla/5.0 (Android 9; Mobile; rv:78.0) Gecko/20100101 Firefox/78.0";
private static final Pattern YT_CLIENT_NAME_PATTERN = Pattern.compile("INNERTUBE_CONTEXT_CLIENT_NAME\\\":(.*?)[,}]");
private String ytClientVersion;

View File

@ -19,9 +19,9 @@ import okhttp3.ResponseBody;
public final class DownloaderTestImpl extends Downloader {
private static final String USER_AGENT
= "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0";
= "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0";
private static DownloaderTestImpl instance;
private OkHttpClient client;
private final OkHttpClient client;
private DownloaderTestImpl(final OkHttpClient.Builder builder) {
this.client = builder.readTimeout(30, TimeUnit.SECONDS).build();