Skip to content
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

Merged
merged 5 commits into from
Mar 9, 2024

Conversation

kylewandishin
Copy link
Collaborator

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()

dawsbot and others added 2 commits March 7, 2024 11:25
…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`
Copy link
Owner

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?

Copy link
Collaborator Author

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

Copy link
Owner

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 {
Copy link
Owner

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 ✅

@dawsbot dawsbot merged commit 135ae11 into dawsbot:fix-scraper Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants