Draft
Conversation
backend/scraper-cron/openaiClient.ts
Outdated
| function: { | ||
| name: "listing-extractor", | ||
| description: | ||
| "Tool to best single url for finding a job board or company directory from a site map", |
Contributor
There was a problem hiding this comment.
These go to the AI, right? Probably not critical but "get" is missing from 'Tool to get best single url...' - best might be tokenized as a verb and cause issues
Author
There was a problem hiding this comment.
Yep - thx for the heads up.
Comment on lines
42
to
55
| const checkRedirectsOnAts = (response: Response) => { | ||
| if (response.redirected) { | ||
| if ( | ||
| response.url.includes("jobs.lever.co") || | ||
| response.url.includes("applytojob.com") || | ||
| response.url.includes("ashbyhq.com") || | ||
| response.url.includes("info.jazzhr.com") | ||
| ) { | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
| return true; | ||
| }; |
Contributor
There was a problem hiding this comment.
Watch out for towering ;)
Can rewrite this (not critical, again) to use early returns.
if (!response.redirected) return true;
// rest
Author
|
Thx for the reviews @mackenziebowes - will address tomorrow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds backend scraping, as an npm script. I found that firecrawl isn't great for pagination so I opted to use open ai + playwright for going through company directories.
Firecrawl handles exposing the appropriate pages on company directories via their map feature and doing the actual job searches.
This is a basic implementation, over the next week I'll be adding
I haven't actually run this over the more than one or two of the company directories, so their are likely a lot of bugs to work out.
Also adds skeleton drizzle setup - feel free to change that as necessary.