Git Product home page Git Product logo

mlcrawler's Introduction

MLCrawler

Features in this project

  • Test suite (not complted) in src/test
  • Dockerfile for building a container image
  • Github action defined for lint, test and contianer build

Run this project

  1. Host configuration This project was proven using following software configuration
    • Python 3.10
    • Pip 22.0
    • virtualenv 20.13
    • Manajro Linux 21.2
    • Surfshark VPN, Mexico location
  2. Install dependencies
    virtualenv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Run
    usage: crawler.py [-h] [-c CATEGORIES] [-p PAGES] [-o OUTPUT_LINKS] [-O OUTPUT_DETAILS] [-n NUM_PROCS] [-t TIMEOUT_Q]
    
    options:
    -h, --help            show this help message and exit
    -c CATEGORIES, --categories CATEGORIES
                        file containing categories, one per line
    -p PAGES, --pages PAGES
                        number search of pages to fetch and analyze
    -o OUTPUT_LINKS, --output-links OUTPUT_LINKS
                        file to write the search results on
    -O OUTPUT_DETAILS, --output-details OUTPUT_DETAILS
                        file to write the results on
    -n NUM_PROCS, --num-procs NUM_PROCS
                        Number of processes
    -t TIMEOUT_Q, --timeout-q TIMEOUT_Q
                        Timeout when fetching from queues, in seconds
    Example: by default the program will read categories.txt, this behaivor can be customized using the --categories option (short option -c)
    source venv/bin/activate
    cd src/crawler
    python crawler.py -c categories.txt -n 1 -t 0.01 -p 1
    Defualt values
    -c categories.txt
    -p 10
    -o product_links.json
    -O product_info.json
    -n 5
    -t 0.01
  4. Run tests
    source venv/bin/activate
    cd src/
    python -m pytest -s .
  5. Build container image.
    The user is memeber of group docker. For non-members of that group execute this with sudo
    docker -t IMAGE_NAME:TAG .
  6. Known issues
    • Pending features for implement
      • product info extraction
    • Tests broken after latest changes
    • Low test coverage

mlcrawler's People

Contributors

angelleon avatar

Watchers

 avatar

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.