Design A Web Crawler
~2 mins read
Follow prices of online products on multiple websites
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
35
36
37
38
39
40
41
class Website:
name: str
url: URL
html: HTML
class Currency(Enum):
...
class Price:
amount: Decimal
currency: Currency
class UUID:
...
class Photo(File):
uid: UUID
class Company:
name: str
class Brand:
name: str
company: Company
class Product:
uid: UUID
name: str
brand: Brand
description: str
class ProductPrice:
product_id: str
price_id: str
timestamp: Timestamp
class ProductPhoto:
product_id: str
photo_id: str
timestamp: Timestamp