Skip to main content

Rei Scrapper

Project description

Rei API CLI Tools

tools to get product from rei.com

Get Started

From Source

make sure use virtual environment with this command

 python -m venv venv
  
 venv\Scripts\activate # on windows
 source venv/bin/activate # on mac or linux
pip install -r requirements.txt --no-cache-dir
cd src/

then run the script and type

python main.py --help

 Usage: main [OPTIONS] COMMAND [ARGS]...

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                                                                                                                                       │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation.                                                                                                                │
│ --help                        Show this message and exit.                                                                                                                                                                     │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ scrape                               Menjalankan Scraping semua halaman pada satu situs berdasarkan kata kunci tertentu                                                                                                       │
│ spesific_scrape                      scraping situs berdasarkan kata kunci dan halaman tertentu                                                                                                                               │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  

to get spesific scrape and scrape help usage type

python main.py scrape --help

 Usage: main scrape [OPTIONS] SEARCH_QUERY

 Menjalankan Scraping semua halaman pada satu situs berdasarkan kata kunci tertentu

╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    search_query      TEXT  [default: None] [required]                                                                                                                                                                       │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --filepath    --no-filepath      Digunakan untuk Menentukan lokasi generate laporan hasil scraping, (Jika Diisi) contoh ./data.csv [default: no-filepath]                                                                     │
│ --is-csv      --no-is-csv        generate hasil scraping menjadi CSV, jika Filepath diisi [default: no-is-csv]                                                                                                                │
│ --is-excel    --no-is-excel      generate hasil scraping menjadi file excel, (Jika Filepath diisi) [default: no-is-excel]                                                                                                     │
│ --is-json     --no-is-json       generate hasil scraping menjadi sebuah File JSON jika filepath diisi [default: no-is-json]                                                                                                   │
│ --help                           Show this message and exit.                                                                                                                                                                  │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  

and for spesific scrape type

python main.py spesific_scrape  --help

 Usage: main spesific_scrape [OPTIONS] SEARCH_QUERY PAGE

 scraping situs berdasarkan kata kunci dan halaman tertentu

╭─ Arguments ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ *    search_query      TEXT     [default: None] [required]                                                                                                                                                                    │
│ *    page              INTEGER  [default: None] [required]                                                                                                                                                                    │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --filepath                     TEXT  Digunakan untuk Menentukan lokasi generate laporan hasil scraping, (Jika Diisi) contoh ./data.csv [default: None]                                                                        │
│ --is-csv      --no-is-csv            generate hasil scraping menjadi CSV, jika Filepath diisi [default: no-is-csv]                                                                                                            │
│ --is-excel    --no-is-excel          generate hasil scraping menjadi file excel, (Jika Filepath diisi) [default: no-is-excel]                                                                                                 │
│ --is-json     --no-is-json           generate hasil scraping menjadi sebuah File JSON jika filepath diisi [default: no-is-json]                                                                                               │
│ --help                               Show this message and exit.                                                                                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  

Example

to run scraper and scrape all product by keywords u can type

python main.py scrape Shoes
  

then for spesific scrape and then generate report

python main.py spesific_scrape shoes 2 --filepath="./data.xlsx" --is-excel
  

Thanks!, feel happy to report a bugs and issues if u found it

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reiscraper-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reiscraper-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file reiscraper-0.1.0.tar.gz.

File metadata

  • Download URL: reiscraper-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for reiscraper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 084681298d3082b5956050842d4319174557ad1c0bdd73888c84610d97ba33d3
MD5 9786160207911817dcd0b695ba76a830
BLAKE2b-256 9a327e962d9cf5b2e0e6b05530c81eadf910b4deb01eb7904d3b3cd31a726e4a

See more details on using hashes here.

File details

Details for the file reiscraper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: reiscraper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for reiscraper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cc15668e0ca9ecfc25ccb11301d36f976c388556331ca07606839a5a7e7b656
MD5 fd9bbb2bb899a6bcb696df47c74f5702
BLAKE2b-256 178a089f4085573e35fef576fab789938358f5ed6715eb505f7e7eae2a105c89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page