diff options
author | Your Name <test> | 2022-12-25 22:59:03 -0600 |
---|---|---|
committer | Your Name <test> | 2022-12-25 22:59:03 -0600 |
commit | 5c11fb28d3f042d4888d2d5ea2952c8d651e8391 (patch) | |
tree | 7d319ae3ae0b529f121188dfcfd54d30e86db2db | |
download | indeedwatcher-5c11fb28d3f042d4888d2d5ea2952c8d651e8391.tar.gz indeedwatcher-5c11fb28d3f042d4888d2d5ea2952c8d651e8391.tar.bz2 indeedwatcher-5c11fb28d3f042d4888d2d5ea2952c8d651e8391.zip |
design and data retreieval done
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | spec/flowchart.gv | 24 | ||||
-rw-r--r-- | spec/flowchart.png | bin | 0 -> 134627 bytes | |||
-rwxr-xr-x | src/indeedwatcher | bin | 0 -> 797072 bytes | |||
-rw-r--r-- | src/indeedwatcher.nim | 22 |
5 files changed, 64 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..7dbbbb7 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ + + + +reads configutation from a toml file +intakes a link to an indeed page +parses page, looks for info like offered pay, job description, vax status, etc to make a score +if the job doesn't meet the configured minimum score, the job is discarded +if it's not, it should return the article in the following format so the user can put it in whatever folder desired + +https://URL.example +Example Job Title + +Pay - Company - Part-time/contract/salary + +Description: + +Requirements: + diff --git a/spec/flowchart.gv b/spec/flowchart.gv new file mode 100644 index 0000000..17fe46e --- /dev/null +++ b/spec/flowchart.gv @@ -0,0 +1,24 @@ +digraph G { +"Indeed.com" [shape=diamond] + +config -> "feednim formatter" [label="Read Queries"] +"feednim formatter" -> "feednim" [label="RSS URLs"] +"feednim" -> "Indeed.com" [label="HTML request"] +"Indeed.com" -> "feednim" [label="RSS job listings"] +"feednim" -> "webdriver" [label="full job posting's URL"] +"webdriver" -> "Indeed.com" [label="HTML request"] +"Indeed.com" -> "webdriver" [label="HTML of jobpage"] +"webdriver" -> "HTML parser" [label="raw HTML page data"] +"HTML parser" -> "Job Value Scorer" [label="Raw job description data"] + + +config -> "Job Value Scorer" [label="Priorities"] +config -> "Cache System" [label="Cache location"] +"Job Value Scorer" -> "Cache System" [label="URL of currently parsing job post"] +"Cache System" -> "Job Value Scorer" [label="True or False to if URL is in database"] +"Job Value Scorer" -> "nimPDF" [label="Formatted job data"] +"nimPDF" -> "Saver" [label="PDF file"] +config -> "Saver" [label="save location"] +"Saver" -> "Filesystem" [label="PDF file"] + +} diff --git a/spec/flowchart.png b/spec/flowchart.png Binary files differnew file mode 100644 index 0000000..8c6bc0d --- /dev/null +++ b/spec/flowchart.png diff --git a/src/indeedwatcher b/src/indeedwatcher Binary files differnew file mode 100755 index 0000000..6c19c76 --- /dev/null +++ b/src/indeedwatcher diff --git a/src/indeedwatcher.nim b/src/indeedwatcher.nim new file mode 100644 index 0000000..0c7e8a4 --- /dev/null +++ b/src/indeedwatcher.nim @@ -0,0 +1,22 @@ +import rss +import webdriver +import osproc +import threadpool +import options + +var test = getRSS("https://rss.indeed.com/rss?q=Linux&l=Arkansas&explvl=mid_level") +echo test.items[0].link + +#TODO put location of chromedriver into config +let chromedriver = startProcess("/usr/bin/chromedriver") +let driver = newWebDriver("http://localhost:9515") +let session = driver.createSession() + +session.navigate(test.items[0].link) +echo session.findElement(".jobsearch-DesktopStickyContainer").get().getText() +echo session.findElement(".jobsearch-JobDescriptionSection-sectionItem").get().getText() +echo session.findElement("#salaryGuide").get().getText() +echo session.findElement("#jobDescriptionText").get().getText() +echo session.findElement("#jobDescriptionText").get().getText() +terminate(chromedriver) + |