crawl_config.json 2.77 KB
{
  "version": "1.0",
  "description": "topic-selector 选题筛选器爬取配置",
  "data_sources": [
    {
      "name": "百度热搜",
      "url": "https://top.baidu.com/board?tab=realtime",
      "method": "GET",
      "headers": {
        "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
      },
      "update_frequency": "实时",
      "status": "active",
      "parser": {
        "type": "html",
        "selector": ".item-wrap .item-title",
        "fields": ["rank", "title", "heat"]
      }
    },
    {
      "name": "哔哩哔哩热搜",
      "url": "https://api.bilibili.com/x/web-interface/popular",
      "method": "GET",
      "headers": {
        "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
      },
      "update_frequency": "实时",
      "status": "active",
      "parser": {
        "type": "json",
        "path": "data.list",
        "fields": ["title", "desc", "pic", "stat"]
      }
    }
  ],
  "filter_rules": {
    "pre_filters": [
      {
        "type": "exclude_keywords",
        "keywords": ["敏感", "违规", "作弊", "谣言"]
      },
      {
        "type": "min_heat_threshold",
        "value": 1000
      }
    ],
    "scoring_dimensions": [
      {
        "name": "热度指数",
        "key": "heat_score",
        "weight": 0.3,
        "metrics": ["search_volume", "read_count", "discussion_count"]
      },
      {
        "name": "话题延展性",
        "key": "extendability",
        "weight": 0.25,
        "metrics": ["angle_count", "controversy_level", "knowledge增量"]
      },
      {
        "name": "受众覆盖",
        "key": "audience_coverage",
        "weight": 0.25,
        "metrics": ["age_group", "purchasing_power", "interest_match"]
      },
      {
        "name": "生命周期",
        "key": "lifecycle",
        "weight": 0.2,
        "metrics": ["trend_phase", "time_sensitivity", "reversal_risk"]
      }
    ],
    "industry_categories": [
      "科技数码",
      "娱乐明星",
      "社会民生",
      "国际关系",
      "财经商业",
      "健康养生",
      "教育职场"
    ],
    "output_top_n": 20
  },
  "output_format": {
    "type": "json",
    "schema": {
      "topic_id": "string",
      "title": "string",
      "category": "string",
      "source": "string",
      "source_url": "string",
      "heat_score": "number",
      "extendability_score": "number",
      "audience_score": "number",
      "lifecycle_score": "number",
      "total_score": "number",
      "crawl_time": "string"
    }
  },
  "crawl_settings": {
    "request_interval_ms": 2000,
    "max_retries": 3,
    "timeout_ms": 10000,
    "respect_robots_txt": true
  }
}