puppeteer / puppeteer

JavaScript API for Chrome and Firefox
https://pptr.dev
Apache License 2.0
88.28k stars 9.06k forks source link

Syntax error-basic puppeteer usage language in .js file #8125

Closed Sad-LadTTS closed 2 years ago

Sad-LadTTS commented 2 years ago

New to coding- TLDR; D&D nerd who found a TTS mod which allows the user to pull character sheets from dndbeyond that was ostensibly broken. Another user had commented that by implementing a fix to the code in .js file to allow pupeteer (required) to run in incognito mode would bypass the bot-detection thwarting the process at present.

Swapped the code, ran a syntax checker, and all looked green, no errors. Downloaded puppeter via node.js, and went to test the process, and am being hit with a syntax error - 800A03EA, line 37, character 1. The line in question is as follows:

const puppeteer = require('puppeteer');

Syntax checker, and even puppeteer's own documentation seem to refer to that line -as is- for general use. Character 1 would be the letter 'c', and I've gone in checking if there are any extra spaces or other odd characters anywhere in that line with no luck.

Steps to reproduce

Tell us about your environment:

What steps will reproduce the problem?

Please include code that reproduces the issue.

const puppeteer = require('puppeteer');

What is the expected result?

An instance of Chrome will launch, and attempt to pull the info from dndbeyond (provided I get that far)

What happens instead? Consistent Javascript error 800A03EA, line 37, character 1 - and the attempt terminates there.

I'm attaching a sample of the .js file with the original code pre-customization (dnd beyond URLS, my user path for Chrome, etc...), minus the fix in line 86 to tell the browser to run in incognito mode. Hoping someone can point me in the right direction re: the Syntax error node.js keeps throwing so I can at least get a bit further along with the process of testing this thing.

If I missed a similar existing issue in stackoverflow or elsewhere talking about this that I didn't see, I apologize!

scrapperMulti.txt

Sad-LadTTS commented 2 years ago

Edit: after some further experimenting, I'm attempting to run a simple puppeteer sample file as shown in the Usage section. Essentially the same error - it's triggering on that first line, first character with a 800A03EA Jscript compilation error.

stale[bot] commented 2 years ago

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

stale[bot] commented 2 years ago

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!