FD Industry Data Spiders
Scrapling-based spiders for collecting flower industry data and open dataset metadata from Chinese and international sources.
Spiders
| Spider | Source | Description |
|---|---|---|
| flower-association | chinaflower.org.cn | China Flower Association news, policies, market data |
| flower-trading | kunmingflower.com | Kunming Flower Trading Center prices and varieties |
| flower-auction | kifc.cn | Kunming International Flower Auction Center auction data |
| kaggle | kaggle.com/datasets | Kaggle dataset metadata (flower, China, agriculture) |
| github-datasets | github.com | GitHub awesome China dataset repositories |
Requirements
- Python 3.10+
- scrapling >= 0.4.7
Install dependencies:
pip install "scrapling[all]>=0.4.7"
scrapling install --force
Usage
Run Individual Spiders
# China Flower Association
cd spiders/flower-association
python spider.py
# Kunming Flower Trading Center
cd spiders/flower-trading
python spider.py
# Kunming International Flower Auction Center
cd spiders/flower-auction
python spider.py
# Kaggle Datasets
cd spiders/kaggle
python spider.py
# GitHub Datasets
cd spiders/github-datasets
python spider.py
Run All Spiders
python run_all.py
Programmatic Usage
from spiders.flower_auction.spider import FlowerAuctionSpider
spider = FlowerAuctionSpider()
result = spider.start()
print(f"Scraped {result.stats.items_scraped} items")
print(f"Duration: {result.stats.elapsed_seconds:.1f}s")
result.items.to_json("output.json", indent=True)
Output Structure
Each spider produces:
- SQLite database in
spiders/<name>/data/ - JSON export in
spiders/<name>/output/
Data Coverage
Flower Industry Data
- Auction prices and trading volumes
- Flower variety statistics
- Market trends and seasonal data
- News and policy updates
Open Data Platforms
- Dataset metadata extraction
- Download links and file information
- Dataset descriptions and tags
- Repository statistics
Configuration
Each spider has its own manifest.yaml with:
- Data source URLs
- Output schema
- Rate limiting settings
- Feature flags
Remote Browser (Playwright via CDP)
By default, browser-enabled spiders (flower-auction, flower-trading) use a local headless Chromium instance. To use a remote browser (e.g., on k8s), set BROWSER_CDP_URL:
# Local browser (default)
python spiders/flower-auction/spider.py
# Remote browser via CDP
BROWSER_CDP_URL=ws://browser-cdp:3000 python spiders/flower-auction/spider.py
The remote browser can be any CDP-compatible service (e.g., browserless/chrome, zenika/alpine-chrome, or a headless Chrome with --remote-debugging-port=9222). Each spider gets its own isolated browser context.
Notes
- All spiders respect
robots.txt - Rate limiting is configured to avoid overloading servers
- Flower auction data is time-sensitive and should be crawled frequently
- Kaggle/GitHub spiders focus on metadata, not full dataset downloads
- SQLite databases use deduplication constraints
License
MIT
Metadata
Release files for fd-industry-data 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fd_industry_data-0.1.0.tar.gz | 260.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fd_industry_data-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 776.8 kB
Release files / fd_industry_data-0.1.0.tar.gz
| Download URL | fd_industry_data-0.1.0.tar.gz |
|---|---|
| Size | 260.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73416ea33a5d84d1a88667574404574c99bdc62f55df333d85c97668d1638e87
|
|
BLAKE2b-256 checksum How to use checksums |
402bad26d9ad6c944cd964300542ecd611b6e74dbb4fec66fef48a736dc5278a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / fd_industry_data-0.1.0-py3-none-any.whl
| Download URL | fd_industry_data-0.1.0-py3-none-any.whl |
|---|---|
| Size | 516.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
271a4af481a5c4e2e04fef19bc9894b3b2ce1cfdf8c852900fc51645c97b5a8c
|
|
BLAKE2b-256 checksum How to use checksums |
9459eb0d67c33dcf144b1acadb8dbb5d78129b94f7aab67d2c8f3c998eac8b94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|