im trying to solve a recaptcha from a website im trying to scrape usually the way it works is , captcha is inside a form , i’ll send the captcha data to a solving captcha api (im using DBC) , they return a token i put the token inside captcha input (#g-recaptcha-response) and even tho the green check do…
Tag: node.js
Get user input through Node.js console
I have just started using Node.js, and I don’t know how to get user input. I am looking for the JavaScript counterpart of the python function input() or the C function gets. Thanks. Answer There are 3 options you could use. I will walk you through these examples: (Option 1) prompt-sync: In my opinion, i…
Nodejs module extends with other module
Hi i have parent module like this. and a Child prototype class like this. How i implement inheritance? I searched by google but no solution works for me. Answer As @jfriend00 said, I write these functions with class keyword which is a syntactic sugar for your code! usermgmt.js Write authentication like this. …
getAttribute is not available on the ElementHandle
I’m using playwright version 0.13.0, I have an instance of ElementHandle, but the getAttribute function is not available, calling it throws an error saying getAttribute is not a function: I double-checked with the debugger, the function is not on the instance. Also, there’s no equivalent of page.e…
Difference between Web Streams and Node.js Stream APIs
I’m building a file upload application to familiarize myself with the concept of streams. I’m trying to turn a file list or blobs into a stream then upload it to the backend and store it on the file system. I had no issue with frontend and backend implementations respectively but I’m having …
Heroku deployment of Node application returns node-waf: not found
I am attempting to deploy my Node.js application to Heroku by connecting Heroku to my Github repository and deploying the master branch. I have tried a number of different approaches to deploy my application but all of them return the same error. The exact build log can be found below: My package.json file ca…
pdf2json parse error in node js application
I am having trouble converting pdf to json format using pdf2json. I want to convert a pdf file into json format using the pdf2json library via nodejs. However, there was no json file in the directory I specified for json, and it did not expire when I put an empty json file. When I run my code in debug mode,
Problem with axios post request from Nuxt.js to external API
I’m trying for many hours now, to get a simple post request to my external api working from Nuxt. It works as expected from a seperate node instance, I can POST and GET as needed with the following: Also with curl: So far so good, now I want to implement this in my Nuxt project. I had to set up
How to catch unhandledRejection?
I wrote a Telegram bot using TelegrafJS, this framework wraps the Telegram API. The problem that I’m facing is how to correctly manage the unhandled rejection, in fact when I call this method: where ctx is the instance of TelegrafJS I got: Bot error: Error: 400: Bad Request: message to delete not found …
Mocha + TypeScript: Cannot use import statement outside a module
I was watching this video in order to learn how to add some simple tests to my Express routes but I am getting all kind of errors while executing a test. The error is: import * as chai from ‘chai’; ^^^^^^ SyntaxError: Cannot use import statement outside a module I have read some similar Stack Over…