-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
77 lines (70 loc) · 1.69 KB
/
config.py
File metadata and controls
77 lines (70 loc) · 1.69 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"""
Configuration settings for Vinted scraper.
"""
# Base URLs
BASE_URL = "https://www.vinted.com"
CATALOG_URL = f"{BASE_URL}/catalog"
# ScrapingAnt API
SCRAPINGANT_API_URL = "https://api.scrapingant.com/v2/general"
# Default request settings
DEFAULT_DELAY = 1.0 # seconds between requests
DEFAULT_PAGES = 2
ITEMS_PER_PAGE = 96 # Vinted shows ~96 items per page
# Categories mapping
CATEGORIES = {
"women": {
"id": 1904,
"name": "Women",
"path": "/catalog?catalog[]=1904"
},
"men": {
"id": 5,
"name": "Men",
"path": "/catalog?catalog[]=5"
},
"kids": {
"id": 1912,
"name": "Kids",
"path": "/catalog?catalog[]=1912"
},
"home": {
"id": 1927,
"name": "Home",
"path": "/catalog?catalog[]=1927"
},
"electronics": {
"id": 2467,
"name": "Electronics",
"path": "/catalog?catalog[]=2467"
},
"entertainment": {
"id": 2482,
"name": "Entertainment",
"path": "/catalog?catalog[]=2482"
},
"sports": {
"id": 2497,
"name": "Sports",
"path": "/catalog?catalog[]=2497"
}
}
# Condition options
CONDITIONS = {
"new_with_tags": "New with tags",
"new_without_tags": "New without tags",
"very_good": "Very good",
"good": "Good",
"satisfactory": "Satisfactory"
}
# CSS Selectors
SELECTORS = {
"listing": ".feed-grid__item",
"container": ".new-item-box__container",
"link": "a[href*='/items/']",
"image": "img",
"favorites": "button[aria-label*='favorites']",
"pagination": "a[href*='page=']"
}
# Output settings
OUTPUT_DIR = "output"
DEFAULT_OUTPUT_FILE = "vinted_listings"