Code Monkey home page Code Monkey logo

pricey's Introduction

pricey

goreleaser

Pricey is a pet project to explain crawling concepts with a "real" usecase. It was born after discussing Black Friday with a group of friends. It's backed by the cool library colly.

Pricey is not ambitious. It must be useful for monitoring prices on e-commerces on the web.

Building

go build .

Usage

$ ./pricey --help
Usage of ./pricey:
  -currency string
    	the currency (US$ (US), R$ (BR)...
  -interval duration
    	the time interval for crawling (default 5s)
  -pattern string
    	the corresponding css rule <required>
  -target int
    	the desired price <required>
  -url string
    	the url to be crawled <required>

Limitations

There's a known limitation while the currency format. The target argument expects an int, so if you have a value like $1,499.00, simply pass 149900. You know, floats and money :P

The cli interface is kind of geeky, asking a few params. This could be improved via configuration and defaults.

Contributions

I try to implement only the minimal to be useful. If you want to leave a contribution, PRs are welcome. Try to be organized, even though the project doesn't have a guideline yet.

Be nice and help people! :P

pricey's People

Contributors

axcdnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

victorprb

pricey's Issues

Multiplatform notifications

Is your feature request related to a problem? Please describe.
It's an improvement, a way to notify users on Desktop.

Describe the solution you'd like
Instead of showing only a notification on console, it could alert via Desktop notification.

Describe alternatives you've considered
As an inspiration, I've implemented a very primitive notification on snitch that supports macOS and Linux.

Additional context
It must support multiple platforms (macOS, Linux and who knows Windows).

Configurations enhancements

Is your feature request related to a problem? Please describe.
If I want to monitor multiple URLs, it's too verbose too call pricey multiple times with its respective configurations.
The idea is to reduce the cli interface, so when pricey is started, it reads from the file.

Describe the solution you'd like
I thought in a configuration file at user's home, maybe a csv that supports the same params passed via cli.

Describe alternatives you've considered
To be as smooth as possible, there could be a command to create this file and ask the user for the params, so there's no need to edit the file manually.

The user might wanna run another turn of monitoring URLs, so a command to reset the file could help.

Another thing that might be useful is to run the calls to URLs using goroutines. ๐Ÿ™ˆ

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.