-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscraper.py
34 lines (27 loc) · 1.14 KB
/
scraper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
Diamond-Mate-Backend
Alf-arv, 2021
"""
def scrape():
"""
Main function for the diamond price data scraper
@return: True if successful database.csv export, False otherwise
"""
"""
The output should be a file called database.csv with the following
information including these header names:
+---------+-------+-------+---------+-----------+-------+
| Shape | Carat | Color | Clarity | Cut | Price |
+---------+-------+-------+---------+-----------+-------+
| | | | | | |
| Cushion | 0.50 | K | SI1 | Excellent | 563 |
| | | | | | |
| Emerald | 0.35 | F | SI2 | Ideal | 510 |
| | | | | | |
| Round | 0.90 | G | VVS1 | Good | 950 |
| | | | | | |
| ... | ... | ... | ... | ... | ... |
+---------+-------+-------+---------+-----------+-------+
When successfully done, the above file is saved at ./data/database.csv
"""
return False