Parse cookies from Puppeteer to Http Request block

Hi guys,
For some reason I have to make a config by mixing Puppeteer and builtin OB2 requests.
I would like to extract cookies from Puppeteer session to parse them into a normal Http Request block, is that possible ? I tried with the Get Cookies block from Puppeteer, but I have a feeling that it only works for Puppeteer environment, as nothing is parsed in my Http Request.
Thank you!

Hey, after you get the cookies from puppeteer you have to add them to your request, just put the dictionary variable directly. Here’s the lolicode

BLOCK:PuppeteerOpenBrowser
ENDBLOCK

BLOCK:PuppeteerNavigateTo
LABEL:Navigate To bing.com
  url = "https://bing.com"
ENDBLOCK

BLOCK:PuppeteerGetCookies
LABEL:Get all cookies
  => VAR @browserCookies
ENDBLOCK

BLOCK:HttpRequest
  url = "https://example.com"
  customCookies = @browserCookies
  TYPE:STANDARD
  $""
  "application/x-www-form-urlencoded"
ENDBLOCK

immagine

1 Like

Works well now, thanks !

ArgumentException: An item with the same key has already been added. Key: dtSa

This happens when there are multiple cookies with the same name from multiple domains. I suggest typing the specific domain for the cookies to avoid this.