Archived
1
0
Fork 0
Commit graph

6 commits

Author SHA1 Message Date
d0d606419f
feat: Add limited cdiscount.com support (#31)
- Only the first products are parsed
- Notifications not sent because only available products are listed and
  the very first discovery doesn't send a notification to avoid false
  positives
- Products stay available forever unless there is a retention period
  configured because unavailable products are not listed

Signed-off-by: Julien Riou <julien@riou.xyz>
2021-07-19 13:15:02 +02:00
2c0b972849
fix: exclude cybertek home page (#33)
Signed-off-by: Julien Riou <julien@riou.xyz>
2021-07-12 08:50:36 +02:00
244c9f68e7
refactor: move filters out of parser
Filters are now separate structures to include a product or not based
on their own set of properties. For now, include and exclude filters
are supported. They take a regex as an argument and include a product
if the regex matches (or doesn't match) the product name. This commit
will allow us to create new filters on product like on a price range.

Signed-off-by: Julien Riou <julien@riou.xyz>
2021-05-19 17:43:31 +02:00
ab5abcd171
Select or create shop before parsing
A shop map was created to group URLs by shops and process them in order. Now
that we have Amazon and each URL can be parsed independently, there is no need
to group them anymore. Moreover, shops were passed as an argument to the
handleProducts function. Shop name can be deduced by the parser itself. The
parser has a reference to the database. The parser now select or create the shop
before parsing products.

Signed-off-by: Julien Riou <julien@riou.xyz>
2021-04-01 17:50:50 +02:00
5ac5f78ae2
Add Amazon support (#3)
This commit introduces the Amazon support with calls to the Product Advertising
API (PA API). For now, I was only able to use the "www.amazon.fr" marketplace.
I will add more marketplaces when my Amazon Associate accounts will be
validated.

Signed-off-by: Julien Riou <julien@riou.xyz>
2021-04-01 12:59:16 +02:00
e67ab63ca8
Prepare for new parsers
- Rename "Parser" to "URLParser"
- Make "Parse" function generic
- Rename "crawlShop" function to "handleProducts"
- Reduce "handleProducts" footprint a little bit

Signed-off-by: Julien Riou <julien@riou.xyz>
2021-03-23 09:00:10 +01:00
Renamed from parser.go (Browse further)