diff options
| author | unwox <me@unwox.com> | 2024-10-09 10:49:36 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-10-09 10:52:40 +0600 |
| commit | ddc11ff1cc31f17ff46523a649917940357825b5 (patch) | |
| tree | ea4d1c59382471ca78567e8422a5e661540f79b9 | |
| parent | 469a210832d2e89038a8732414aafe42f928a14f (diff) | |
small fixes in parsers
| -rw-r--r-- | parser/artoftea.fnl | 8 | ||||
| -rw-r--r-- | parser/chaekshop.fnl | 4 | ||||
| -rw-r--r-- | parser/clubcha.fnl | 1 | ||||
| -rw-r--r-- | parser/parser.fnl | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/parser/artoftea.fnl b/parser/artoftea.fnl index b1a8c72..1b8b6e1 100644 --- a/parser/artoftea.fnl +++ b/parser/artoftea.fnl @@ -30,10 +30,10 @@ (parser.tag :option {:value "*" :selected "selected"} (* (peg.Cg parser.pegs.number :weight) (+ (peg.P "г") " гр") parser.pegs.spaces))) - (parser.anywhere - (parser.tag :p {:class "price"} - (parser.tag :span {:id "*"} - (peg.Cg (parser.till "</span>") :price))))) + (parser.anywhere + (parser.tag :p {:class "price"} + (parser.tag :span {:id "*"} + (peg.Cg (parser.till "</span>") :price))))) (parser.anywhere (parser.tag :p {:class "price"} (parser.tag :span {:id "*"} diff --git a/parser/chaekshop.fnl b/parser/chaekshop.fnl index b1e4b4e..b6e012a 100644 --- a/parser/chaekshop.fnl +++ b/parser/chaekshop.fnl @@ -38,9 +38,9 @@ (parser.guess-weight product.title))) (local price (number.string->number (string.gsub product.price "," "."))) {:site "chaekshop" - :id (.. "https://chaekshop.ru/" product.url) + :id (.. "https://chaekshop.ru" product.url) :title product.title - :url (.. "https://chaekshop.ru/" product.url) + :url (.. "https://chaekshop.ru" product.url) :description "" :image (.. "https://chaekshop.ru" product.image) :year (parser.guess-year product.title) diff --git a/parser/clubcha.fnl b/parser/clubcha.fnl index c935236..e260fd1 100644 --- a/parser/clubcha.fnl +++ b/parser/clubcha.fnl @@ -90,7 +90,6 @@ ;; does not contain all the products {:path "gaivan" :category "Посуда"} {:path "chashka" :category "Посуда"} - {:path "chashka" :category "Посуда"} {:path "chaynyi-nabor" :category "Посуда"} {:path "chaynik" :category "Посуда"} {:path "glina-farfor" :category "Посуда"} diff --git a/parser/parser.fnl b/parser/parser.fnl index c9c6b69..d5baafa 100644 --- a/parser/parser.fnl +++ b/parser/parser.fnl @@ -129,7 +129,7 @@ (: (anywhere (* (peg.C (^ (peg.R "09") 4)) (maybe " ") - (- "г" (peg.P "гр")))) + (- (+ (peg.P "г") "год") (peg.P "гр")))) :match title))) (fn guess-weight [title] |
