-3

I want to retrieve automaticly the text from a getpaste.link. I'm fine with parsing but I need to wait until the page made it's server request to get the plaintext.

i.e. I use got in NodeJS to get html from a page. I get this : loading getpastlink page Because it doesn't want until I get this: loaded getpastlink page

I've searched up on the documentation for anytype of delays but I didn't find anything.

VLAZ
  • 26,331
  • 9
  • 49
  • 67

1 Answers1

0

Got is a http library meaning you can't wait for dom changes on site. You will need something like puppeteer a headless browser where you can wait for selector or whatever you like to become ready for you to read you can read further about how to use it etc on their website

https://pptr.dev/

Breezer
  • 10,410
  • 6
  • 29
  • 50