You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes you want just one or a couple of cookies from the response. this could be done using an optional filter predicate function or array as a second parameter:
session.setCookiesFromResponse(response,(name,value,allCookiesArray)=>{// filter function, returns true for including, false otherwisereturn['PHPSESSID'].includes(name)&&allCookiesArray.some((s)=>s.name==='_sess');});session.setCookiesFromResponse(response,['PHPSESSID']);// pick cookie name from array
like the Array.filter function, the callback 3rd parameter contains an array of all parsed cookies. this is useful if you want to only include a cookie if another one is present.
sometimes you want just one or a couple of cookies from the response. this could be done using an optional filter predicate function or array as a second parameter:
like the
Array.filter
function, the callback 3rd parameter contains an array of all parsed cookies. this is useful if you want to only include a cookie if another one is present.at the moment having to resort to:
session.setPuppeteerCookies
accepts a plain{ name, value }[]
, so it's easier to filter before passing to the functionThe text was updated successfully, but these errors were encountered: