Skip to content

Commit

Permalink
Rename scraping.py to scraper.py
Browse files Browse the repository at this point in the history
- update README according to name change
  • Loading branch information
Crinibus committed Oct 10, 2020
1 parent a142588 commit 269fd99
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The tech scraper can scrape prices on products from Komplett.dk, Proshop.dk, Com
## Scrape products <a name="scrape-products"></a>
To scrape prices of products run this in the terminal:

python3 scraping.py
python3 scraper.py

## Start from scratch <a name="start-scratch"></a>
If you want to start from scratch with no data in the records.json file, then just delete all the content in records.json apart from two curly brackets:

{}

Then delete the lines under the last if-statement in scraping.py.
Then delete the lines under the last if-statement in scraper.py.

Then just add products like described [here](#add-products).

Expand All @@ -42,7 +42,7 @@ e.g.

python3 add_product.py gpu https://www.komplett.dk/product/1135037/hardware/pc-komponenter/grafikkort/msi-geforce-rtx-2080-super-gaming-x-trio

This adds the category (if new) and the product to the records.json file, and adds a line at the end of the scraping.py file so the script can scrape price of the new product.
This adds the category (if new) and the product to the records.json file, and adds a line at the end of the scraper.py file so the script can scrape price of the new product.

**OBS**: The category can only be one word, so add a underscore instead of a space if needed.<br/>
**OBS**: The url must have the "https://www." part.<br/>
Expand Down
6 changes: 3 additions & 3 deletions tech_scraping/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ If you want to start from scratch with no data in the records.json file, then ju

{}

Then delete the lines under the last if-statement in scraping.py.
Then delete the lines under the last if-statement in scraper.py.

Then just add products like described [here](#add-products).

## Scrape products <a name="scrape-products"></a>
To scrape prices of products run this in the terminal:

python3 scraping.py
python3 scraper.py

## Add products <a name="add-products"></a>
Before scraping a new product, run a similar line to this:
Expand All @@ -36,7 +36,7 @@ e.g.

python3 add_product.py gpu https://www.komplett.dk/product/1135037/hardware/pc-komponenter/grafikkort/msi-geforce-rtx-2080-super-gaming-x-trio

This adds the category (if new) and the product to the records.json file, and adds a line at the end of the scraping.py file so the script can scrape price of the new product.
This adds the category (if new) and the product to the records.json file, and adds a line at the end of the scraper.py file so the script can scrape price of the new product.

**OBS**: The category can only be one word, so add a underscore instead of a space if needed.<br/>
**OBS**: The url must have the "https://www." part.<br/>
Expand Down
File renamed without changes.

0 comments on commit 269fd99

Please sign in to comment.