scrape_latest
Scrapes the latest kits from multiple pages on FootballKitArchive.Usage
Options
--start-page- Page number to start scraping from (default: 1)--end-page- Page number to end scraping at (default: 300)--workers- Number of worker threads (default: 4)--delay- Delay in seconds between pages (default: 2)
Examples
Scrape pages 1-100 with default settings:Notes
- Supports bidirectional scraping (forward and backward)
- Uses proxy when scraping to avoid IP blocks
- Displays progress information including success/failure counts
- Kits within each page are processed in parallel for efficiency
scrape_club_details
Scrapes club logos and details for clubs that are missing logo data.Usage
Notes
- Automatically finds clubs with missing logos (
logo__isnull=True) - Uses 15 concurrent workers for parallel processing
- Uses proxy to avoid rate limiting
scrape_kit_by_slug
Scrapes a specific kit by its slug identifier.Usage
Arguments
slug- The slug of the kit to scrape (required)
Options
--force- Force rescraping even if the kit already exists and use proxy
Examples
Scrape a specific kit:Notes
- Checks if kit already exists before scraping (unless
--forceis used) - Uses proxy when
--forceflag is provided - Displays success or error messages with details
scrape_whole_club
Scrapes all kits for all clubs in the database.Usage
Notes
- Processes all clubs in the database
- Uses 25 concurrent workers for maximum throughput
- May take considerable time depending on number of clubs
scrape_brand
Scrapes brand logos and details for brands missing logo data.Usage
Notes
- Automatically finds brands with missing logos (
logo__isnull=True) - Uses 15 concurrent workers for parallel processing
- Orders brands by name (descending)
- Handles errors gracefully and continues with remaining brands
- Automatically constructs brand slugs using the BRAND_SLUG_SUFFIX constant
scrape_user
Scrapes a user’s collection from FootballKitArchive using their user ID.Usage
Arguments
userid- The user ID to scrape (required, must be an integer)
Examples
Scrape user collection:Output
The command:- Scrapes all collection entries from the user’s profile
- Caches the data for 7 days (604800 seconds)
- Displays statistics (total entries, pages scraped)
- Extracts kit slugs and IDs from collection entries
- Saves raw data to
user_collection_{userid}.json
Notes
- Uses the FootballKitArchive API for efficient data retrieval
- Filters out entries with custom fields, purchase/value data, gender, or printing type
- Displays warnings if no entries are returned
- Shows first 10 kit references in console output
- Logs detailed information including filtering details