crawlee-python icon indicating copy to clipboard operation
crawlee-python copied to clipboard

Add init script for Playwright browser context

Open vdusek opened this issue 4 months ago • 0 comments

  • For now, let's use a data file containing fingerprints (or at minimum user agents) from the Apify fingerprint dataset.
  • Use the init script from the fingerprint suite.
  • A fingerprint, selected based on parameters such as OS or browser type, should be passed to the init script.
  • Load the JS init script from a file and convert it into a string for injection.
  • Inject the script into the Playwright browser context using BrowserContext.add_init_scripts().
  • Possible inspiration:

vdusek avatar Sep 27 '24 18:09 vdusek