-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix error parsing and add dynamic hostname generation #18
Conversation
…parse.ts which contains a function taking in any js Error type and displays a user readable error that goes a little more in depth.\nin puppeteer-fetch-all.ts i imported the hostname function from the os library in js and put it in place for the static '127.0.0.1' previously used in openBrowser()
readme.md
Outdated
|
||
The file of concern is `scripts/puppeteer-fetch-all.ts` and can be executed with `npx tsx scripts/puppeteer-fetch-all.ts` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come this contribution information is getting removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is strange, i did not make the readme a part of this commit. I will fix this before submitting next request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take care of this. For future reference, you can fix this with git checkout origin/master readme.md
const addressesHtml = await fetchPageHtml(url, browser); | ||
const allAddresses = selectAllAddresses(addressesHtml); | ||
console.dir({ url, allAddresses }); | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good try/catch wrapper for error handling ✅
added error-parse.ts which contains a function taking in any js Error type and displays a user readable error that goes a little more in depth.\nin puppeteer-fetch-all.ts i imported the hostname function from the os library in js and put it in place for the static '127.0.0.1' previously used in openBrowser()