diff options
| author | unwox <me@unwox.com> | 2024-09-27 16:48:20 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-09-27 16:48:20 +0600 |
| commit | 0ea9ddc67a4e771c57189b9bec721dd30df5f315 (patch) | |
| tree | 6739c108d39dd503c9292bd243ab91ad40f55ce0 /parser/artoftea.fnl | |
| parent | 3066524dd9d2e13b4b363d76f3d9bc9394b1b996 (diff) | |
refactor json fetcher a bit
Diffstat (limited to 'parser/artoftea.fnl')
| -rw-r--r-- | parser/artoftea.fnl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parser/artoftea.fnl b/parser/artoftea.fnl index 1f03ed1..205d5d0 100644 --- a/parser/artoftea.fnl +++ b/parser/artoftea.fnl @@ -8,7 +8,7 @@ (local number (require :lib.number)) (local fetcher (require :fetcher)) -(fn url-formatter [path page] +(fn format-url [path page] (.. "https://artoftea.ru/" path "/?page=" page)) (local product-peg @@ -50,6 +50,7 @@ (local price (number.string->number product.price)) {:site "artoftea" :id product.id + :title product.title :url product.url :description product.description :image product.image @@ -64,7 +65,7 @@ (fetcher.from-html [{:path "redtea" :category "Красный чай"} {:path "greentea" :category "Зеленый чай"}] - url-formatter + format-url product-peg normalize)) |
