Code Monkey home page Code Monkey logo

oc-p2-books-scraping's Introduction

OpenClassrooms: Projet 2: Books To Scrape

Ce script permet de récupérer les informations de tout les produits sur le site http://books.toscrape.com/. Ces informations sont les suivantes:

  • URL du livre
  • Universal Product Code (upc)
  • Titre du livre
  • Prix, taxe incluse
  • Prix, taxe exclue
  • Quantité disponible
  • Description du produit
  • Catégorie
  • Rating
  • URL de l'image
  • Chemin local de l'image téléchargée

En plus de cela, les images des livres sont téléchargées. Ces données sont ensuite classées par catégories et inscrites dans un fichier CSV correspondant. Les données sont générées à la racine du projet suivant cette arborescence:

|-- data/
    |-- categorie1/
        |-- categorie1.csv
        |-- imgs/
            |-- img1.jpg
            |-- img2.jpg
            ...etc
    |-- categorie2/
    ...etc

Installation:

Commencez tout d'abord par installer Python. Lancez ensuite la console, placez vous dans le dossier de votre choix puis clonez ce repository:

git clone https://github.com/FlorianMgs/OC_P2_BooksToScrape.git

Placez vous dans le dossier OC_P2_BooksToScrape, puis créez un nouvel environnement virtuel:

python -m venv env

Ensuite, activez-le. Windows:

env\scripts\activate.bat

Linux:

source env/bin/activate

Il ne reste plus qu'à installer les packages requis:

pip install -r requirements.txt

Vous pouvez enfin lancer le script:

python main.py

oc-p2-books-scraping's People

Contributors

florianmgs avatar

Watchers

 avatar  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.