Skip to content

feat: Make PlaywrightCrawler use fingerprint_generator by default #1054

@Pijukatel

Description

@Pijukatel

Currently default value of fingerprint_generator argument of PlaywrightCrawler.__init__ is None. Use DefaultFingerprintGenerator() instead.

Add helper method to FingerprintGenerator that will override some fingerprint generation settings of already initialized FingerprintGenerator and add something like "allow_init_overrides" flag to FingerprintGenerator.

FingerprintGenerator should then support something like this:

fg = FingerprintGenerator(some_args..., allow_init_overrides=True)
fg.override_init(some_args...) -> "Will override settings"
fg = FingerprintGenerator(some_args..., allow_init_overrides=False)
fg.override_init(some_args...) -> "Will raise an error"

PlaywrightCrawler will have DefaultFingerprintGenerator(allow_init_overrides=True) in init and then it can use some PlaywrightCrawler.__init__ args override FingerprintGenerator settings -> for example browsertype.

On the other hand user can forbid such overrides if they pass FingerprintGenerator(some_args..., allow_init_overrides=False)

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions