MeiK2333 / pyppeteer_stealth

MIT License
245 stars 53 forks source link

add media codecs evasion strategy #2

Closed Granitosaurus closed 4 years ago

Granitosaurus commented 4 years ago

As per js upstream: https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth/evasions/media.codecs

Fix Chromium not reporting "probably" to codecs like videoEl.canPlayType('video/mp4; codecs="avc1.42E01E"'). (Chromium doesn't support proprietary codecs, only Chrome does)

tested on http://g2.com; before this strategy 100% distils bot protection detection, with this patch it's not detected.