summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-12-12 13:45:02 +0600
committerunwox <me@unwox.com>2024-12-16 22:58:34 +0600
commitd3a445ad7270e788812dd16e19a2820fc70a91b6 (patch)
treec63eccfcf6341f47860d3e74c6a6a83bfa0f73d2 /bin
parentb018944e6066e766560282c0bcd83df05899a4bc (diff)
implement gorkovchay.ru parser
Diffstat (limited to 'bin')
-rw-r--r--bin/fetch.fnl4
-rw-r--r--bin/serve.fnl2
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/fetch.fnl b/bin/fetch.fnl
index 006cbea..0551d76 100644
--- a/bin/fetch.fnl
+++ b/bin/fetch.fnl
@@ -6,6 +6,7 @@
(local array (require :lib.array))
(local cache (require :lib.cache))
+(local gorkovchay (require :parser.gorkovchay))
(local moychay (require :parser.moychay))
(local ozchai (require :parser.ozchai))
(local ipuer (require :parser.ipuer))
@@ -151,7 +152,8 @@
;; replace with with-tx
(local tx (must (luna.db.begin db)))
(must (luna.db.exec-tx tx "DELETE FROM product_tags;" []))
-(each [_ parser (pairs [chaekshop clubcha artoftea ipuer ozchai moychay])]
+(each [_ parser (pairs [ozchai gorkovchay chaekshop clubcha artoftea ipuer
+ moychay])]
(store-products tx (parser.products)))
(cache.clear-tx tx "page:")
(must (luna.db.commit tx))
diff --git a/bin/serve.fnl b/bin/serve.fnl
index ea75edd..68dea35 100644
--- a/bin/serve.fnl
+++ b/bin/serve.fnl
@@ -36,7 +36,7 @@
(tset package :loaded module old))))))
(local db
- (must (luna.db.open "file:var/db.sqlite?_journal=WAL&_sync=NORMAL&mode=ro")))
+ (must (luna.db.open "file:var/db.sqlite?_journal=WAL&_sync=NORMAL")))
(local query-synonyms {
"шэн" "шен"