Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject MediaSource API to hide codec support #24

Open
JaneJeon opened this issue Mar 11, 2022 · 4 comments
Open

Inject MediaSource API to hide codec support #24

JaneJeon opened this issue Mar 11, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@JaneJeon
Copy link

Just a quick one, but according to https://github.com/berstend/puppeteer-extra/wiki/Using-Google-Chrome-instead-of-Chromium, Chromium gets detected because of the media codec types it supports.

Looks like this repo is already doing a form of codec injection, but since we're injecting the codec already thought it might be good to "patch up" another place where the codec could be exposed (via the MediaSource API).

Thanks

@petrpatek
Copy link
Contributor

I think this makes sense, otherwise, this "lie" could be easily detected.

@petrpatek petrpatek added the enhancement New feature or request. label Mar 13, 2022
@barjin barjin transferred this issue from apify/fingerprint-injector Jul 5, 2022
@szmarczak
Copy link
Contributor

What's the reason of not using Google Chrome instead?

@barjin
Copy link
Collaborator

barjin commented Jul 7, 2022

Thanks for bringing this up! As @szmarczak mentioned, there is an easy quick fix - using Playwright's channel: 'chrome' option (see lower). This way, your automation framework controls an actual instance of a Chrome browser. Unfortunately, I am afraid we do not collect enough data to perform reliable codec support injection as of now.

(async () => {
    const b = await chromium.launch({
        'channel':'chrome', // try commenting this line to see the difference :)
        'headless': false
    });
    const p = await b.newPage();
    await p.goto('https://w3c-test.org/media-source/mediasource-is-type-supported.html');
})();

@JaneJeon
Copy link
Author

What's the reason of not using Google Chrome instead?

In general, I think it's good idea to cover all your tracks and plug all the holes. But besides that, I am not comfortable relying on only one browser to do all my scraping needs (too many eggs in one basket), and for better or for worse, large parts of the internet is still shut away if you're not Chrome - or at least, if you don't look like Chrome.

I understand if it's not as high of a priority as other items, but it still is a flaw to leave the API unpatched and I hope that it at least gets considered for later. Thanks!

@barjin barjin self-assigned this Jul 21, 2023
@barjin barjin added the t-tooling Issues with this label are in the ownership of the tooling team. label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

4 participants