Categorygithub.com/bitebait/curry
repositorypackage
0.0.0-20241116084413-99ab79240179
Repository: https://github.com/bitebait/curry.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

πŸ› Curry CΓ’mbios

Valor do cΓ’mbio(USDxBRL) em lojas no Paraguay


πŸŽ“ Sobre

Curry Γ© um WebCrawler escrito em Golang com finalidade de verificar o valor do cΓ’mbio de DΓ³lar para Real (USDxBRL) em algumas lojas no Paraguay.


:tada: Features

  1. :white_check_mark: Web Crawler.
  2. :white_check_mark: API JSON Endpoint.
  3. :white_check_mark: In-Memory Cache.
  4. :white_check_mark: Scheduler.
  5. :white_check_mark: SQLite Database to keep history.
  6. :white_check_mark: Custom settings.
  7. :white_check_mark: Easy to add new spiders.

πŸ“Œ Uso

Para utilizar, basta seguir os passos abaixo:

πŸ“œ Rodando

git clone https://github.com/bitebait/curry.git
cd curry/
go run .

Exemplo de saida do terminal:

 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• 
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—  β•šβ–ˆβ–ˆβ•”β•  
β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   
 β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•   β•šβ•β•   
2021/11/27 19:06:00 Running and Listening on :8000
2021/11/27 19:06:00 API Endpoint: /api
2021/11/27 19:06:01 Running crawler...
...
2021/11/27 19:06:09 FINISHED: 30 of 30 urls visited.
2021/11/27 19:06:09 CRAWLER function took 8.403559105s.

Agora basta acessar http://127.0.0.1:8000/api. Caso tenha alterado o endpoint favor verifique o log de saida do terminal ou o arquivo config.yml.

⚠️️ Não esqueça de configurar o arquivo config.yml conforme as suas necessidades! ⚠️


API Json Result:

{
  "createdAt": "2021-11-27T15:21:06.343499301-03:00",
  "items": [
    {
      "name": "example_store1",
      "currency": "BRL",
      "value": "5.7",
      "url": "https://www.example_store1.com/"
    },
    {
      "name": "example_store2",
      "currency": "BRL",
      "value": "5.72",
      "url": "https://www.example_store2.com/"
    }
  ]
}

config.yml:

api:
  port: 8000 # api listen port
  endpoint: /api # api endpoint

db:
  file_name: database.db # sqlite file name

cache:
  max_age: 12  # Refresh cache every 12 hours

currency:
  currency: BRL # Don't change

πŸ•·οΈ Para mais informaΓ§Γ΅es sobre spiders disponΓ­veis e como adicionar uma nova spider, de uma olhada em /spiders e func NewSpider().



βœ… Lista de lojas monitoradas


  1. alboradainfo
  2. aromastore
  3. atacadocollections
  4. atacadoconnect
  5. audiumelectronics
  6. bonanzacambios
  7. cambioschaco
  8. digitalcenterpy
  9. cellshop
  10. comprasparaguai
  11. dolarpy
  12. gabahobby
  13. hbgames
  14. icompy
  15. infinitysport
  16. lgimportados
  17. madridcenter
  18. megaeletro
  19. megaeletronicos
  20. mercosurcambios
  21. mundodocelular
  22. oneclick
  23. pioneerinter
  24. probook
  25. shoppingcentropioneer
  26. tcheloco
  27. tecombras
  28. topdek
  29. victoriastore
  30. visaovip

πŸ“„ ExoneraΓ§Γ£o de responsabilidade e problemas conhecidos

  • Qualquer uso do script Γ© de responsabilidade apenas do usuΓ‘rio. Os usuΓ‘rios do script devem agir de acordo com os termos dos sites acessados.
  • Como acontece com todos os sites, a estrutura do site pode mudar no futuro e, portanto, como costuma acontecer com scripts de scraping, descontinue-o. NΓ£o Γ© realmente uma questΓ£o de saber se o cΓ³digo-fonte do site irΓ‘ mudar, mas sim quando (entΓ£o aproveite enquanto ainda estΓ‘ funcionando)

πŸ”’ LicenΓ§a

Todo o conteΓΊdo apresentado nos sites pertence aos criadores originais.

A licenΓ§a abaixo se refere apenas ao script e nΓ£o ao conteΓΊdo scrapado.

LicenΓ§a - MIT


πŸ”₯ Sinta-se Γ  vontade para contribuir com o cΓ³digo (; πŸ”₯