Closed dr3adx closed 1 year ago
Because we need to know exact path of profile before launch in order to do some preparation.
Because we need to know exact path of profile before launch in order to do some preparation.
what preparation, is this critical?
forcing persistent session breaks a lot of playwright features like storageState this literally destroyed my program because i cant use storageState anymore
@dr3adx The developers of playwright for some reason forbade specifying the path to the profile when using the launch method a long time ago. However, with engine updates, a significant part of the new factors for improving anonymity has been added, which need to prepare the profile in some way before launch.
In the case of launch, the framework itself sets a random path somewhere in the temp folders, and we cannot find it out in advance. Therefore, it was decided to limit the functionality so that later there would be no unnecessary questions and problems with anonymity. Of course, if a good workaround or direct opportunity comes along, the launch method will work just as it did before.
In order to load cookies or local storage, use a permanent profile or the CDP commands. If you have suggestions for the implementation of alternative methods, I will be glad to listen.
I also see that there is a feautre request in the playwright repository to add storageState to launchPersistentContext, so the problem may be solved by itself a little later.
@dr3adx The developers of playwright for some reason forbade specifying the path to the profile when using the launch method a long time ago. However, with engine updates, a significant part of the new factors for improving anonymity has been added, which need to prepare the profile in some way before launch.
In the case of launch, the framework itself sets a random path somewhere in the temp folders, and we cannot find it out in advance. Therefore, it was decided to limit the functionality so that later there would be no unnecessary questions and problems with anonymity. Of course, if a good workaround or direct opportunity comes along, the launch method will work just as it did before.
In order to load cookies or local storage, use a permanent profile or the CDP commands. If you have suggestions for the implementation of alternative methods, I will be glad to listen.
I also see that there is a feautre request in the playwright repository to add storageState to launchPersistentContext, so the problem may be solved by itself a little later.
what anonymity problems, can you please explain this in more technical sense?
"the framework itself sets a random path somewhere in the temp folders" -- profile folder name is always a random letter string of constant length 8 characters, so why not just scan the folder, you already know inside which parent folder its gonna reside.
you already know inside which parent folder its gonna reside.
what anonymity problems, can you please explain this in more technical sense?
At a minimum, the following things cannot be used/configured without a prepared profile:
And so on.
what anonymity problems, can you please explain this in more technical sense?
At a minimum, the following things cannot be used/configured without a prepared profile:
- Default browser extensions.
- Browser components.
- Safe browsing.
- Widevine.
And so on.
so nothing related to actual bot detection? thats what i wanted to ask originally
Why remove .launch and replace it with persistent context with no option to launch in incognito mode ???