summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-22 19:01:28 -0600
committermsglm <msglm@techchud.xyz>2023-01-22 19:01:28 -0600
commitb8c0bd86389cfaa2d0c1c0948abc4380d6426d30 (patch)
treeb9d9ca33f8e2797d56ebc789a6ee545a491eb2d3 /src
parentcdf493760366d754bc412ea4199f7a1469c1ddb5 (diff)
downloadindeedwatcher-b8c0bd86389cfaa2d0c1c0948abc4380d6426d30.tar.gz
indeedwatcher-b8c0bd86389cfaa2d0c1c0948abc4380d6426d30.tar.bz2
indeedwatcher-b8c0bd86389cfaa2d0c1c0948abc4380d6426d30.zip
remove retry system that bogs slower connections
Diffstat (limited to 'src')
-rw-r--r--src/indeedwatcher.nim21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/indeedwatcher.nim b/src/indeedwatcher.nim
index c1946dc..69c0071 100644
--- a/src/indeedwatcher.nim
+++ b/src/indeedwatcher.nim
@@ -30,10 +30,6 @@ if not fileExists(getCacheDir() & "/indeedwatcher/config.toml"):
writeFile(getCacheDir() & "/indeedwatcher/listings.cache", "")
-
-
-#TODO make this create folders and files for this automatically upon first start up
-
#Reading the config file
let config = parsetoml.parseFile(getConfigDir() & "/indeedwatcher/config.toml")
@@ -74,17 +70,13 @@ setControlCHook(terminate)
for feed in feeds:
#Getting the listing URLs from the feeds
- echo "now reading " & feed
var rssFeedReply: RSS
- for attempt in countup(0,5):
- try:
- rssFeedReply = getRSS(feed)
- except:
- if attempt < 5 - 1:
- continue
- else:
- raise
- break
+ #TODO implement a retry-on-fail system
+ try:
+ echo "now reading " & feed
+ rssFeedReply = getRSS(feed)
+ except:
+ raise
for entry in rssFeedReply.items:
@@ -98,6 +90,7 @@ for feed in feeds:
var URL = entry.link
let URLID = entry.link.split('&')[3]
if not any(cache, proc (input: string): bool = input.contains(URLID)):
+ echo "Telling chromium to navigate to " & URL
session.navigate(URL)
counter = counter + 1