MCPcopy Create free account

hub / github.com/Barabama/FreeNodes / functions

Functions175 in github.com/Barabama/FreeNodes

↓ 13 callersMethodrecord_failure
(self, provider: str)
src/llm_router.py:62
↓ 11 callersMethodis_healthy
(self, provider: str)
src/llm_router.py:67
↓ 10 callersFunctionmake_page
(url: str = "http://x", links: list | None = None, markdown: str = "", html: str = "", success:
tests/test_site_processor.py:45
↓ 10 callersMethodpick
(weights: dict[str, int], is_healthy: callable, exclude: set[str] | None = None)
src/llm_router.py:28
↓ 9 callersMethod_parse_article_date
Extract date from article title text or URL href. Tries these patterns in order: 1. ``X月X日`` in title text → 202
src/site_processor.py:250
↓ 7 callersMethod_extract_regex
Extract a regex pattern from LLM output that may contain analysis text. Tries: 1. Content inside backtick code fences 2.
src/llm_router.py:251
↓ 7 callersMethod_pick_articles
Select the *max_articles* newest articles from a blog listing page. Rule-only: tries several date formats found across different blog sites.
src/site_processor.py:148
↓ 7 callersMethodrun
Run all three merge stages and return results.
src/merger.py:52
↓ 6 callersMethod_dedup_proxies
Deduplicate by server:port:type; rename name collisions with _N suffix.
src/merger.py:221
↓ 6 callersMethod_detect
Helper to call the static method.
tests/test_merger.py:57
↓ 6 callersMethod_extract_by_pattern
Extract subscription URLs matching *pattern*.
src/site_processor.py:287
↓ 6 callersMethodask
Send *prompt* through weighted routing. Returns empty when all fail.
src/llm_router.py:115
↓ 5 callersMethod_extract_links
Extract subscription links from an article page. Returns (links, pattern_saved).
src/site_processor.py:181
↓ 5 callersMethod_parse_json
Parse LLM JSON response. Strips markdown fences if present.
src/llm_router.py:279
↓ 5 callersMethod_resolve_sites
Resolve target string to a list of SiteConfig.
src/scheduler.py:82
↓ 5 callersMethod_response_text
(resp, is_reasoning: bool)
src/llm_router.py:242
↓ 5 callersMethodrun
Run all (or a single) sites, respecting concurrency limit. Args: target: Optional site name. When set, only that site runs.
src/scheduler.py:28
↓ 4 callersMethod_derive_base
Extract scheme + host from a URL for resolving relative links.
src/site_processor.py:314
↓ 4 callersMethod_download_retry
Download a file with retry.
src/site_processor.py:301
↓ 4 callersMethod_print_summary
(result: MergeResult)
src/merger.py:325
↓ 3 callersFunction_make_router
Build a router with mocked _try_provider returning canned responses. *providers* maps provider name to a list of return values (one per call).
tests/test_llm_router.py:185
↓ 3 callersFunctionload_config
Load config from YAML file. Missing llm section yields empty LLMConfig.
src/config.py:49
↓ 3 callersMethodrecord_success
(self, provider: str)
src/llm_router.py:58
↓ 2 callersMethod_base_clash_config
Return shared Clash base config dict. Used by both ``_merge_yaml`` and ``_build_provider``.
src/merger.py:297
↓ 2 callersMethod_detect_regions
Group proxy names by region keywords. Returns dict of region_label -> [proxy_name]. Unmatched names go into "🌍 其他".
src/merger.py:267
↓ 2 callersMethod_header
Generate a YAML comment header.
src/merger.py:286
↓ 2 callersMethodextract_links
Extract subscription links from page markdown. Looks for downloadable subscription files (.txt/.yaml URLs), subscription service URLs
src/llm_router.py:135
↓ 2 callersFunctionfetch_page
Crawl4AI 爬取页面,返回结构化内容.
src/crawler.py:17
↓ 2 callersMethodgenerate_pattern
Ask LLM to produce a regex matching the site's subscription links. Returns a regex string or None. Post-processes the response to ext
src/llm_router.py:159
↓ 2 callersFunctionsave
输出到 nodes/{site}.{ext}.
src/pipeline.py:27
↓ 1 callersMethod_build_default_groups
Build two default proxy groups: url-test + select.
src/merger.py:249
↓ 1 callersMethod_build_provider
Build a Clash Meta config using proxy-provider references.
src/merger.py:136
↓ 1 callersMethod_merge_txt
Concatenate all .txt files, dedup by line hash.
src/merger.py:63
↓ 1 callersMethod_merge_yaml
Extract proxies from all .yaml files, dedup, rebuild groups.
src/merger.py:102
↓ 1 callersMethod_print_summary
Print a summary table of all site results.
src/scheduler.py:92
↓ 1 callersMethod_try_provider
(self, cfg: ProviderConfig, prompt: str, max_tokens: int)
src/llm_router.py:217
↓ 1 callersMethod_validate_routing
Warn if task_routing references provider names not in the provider list.
src/llm_router.py:101
↓ 1 callersFunctionbuild_readme
Generate README.md with subscription table from config site list.
src/readme_updater.py:13
↓ 1 callersFunctiondownload_file
httpx 下载文件,加大 read timeout 避免大 yaml 超时.
src/crawler.py:49
↓ 1 callersMethodhealth_report
(self)
src/llm_router.py:75
↓ 1 callersFunctioninspect
(name: str, url: str)
inspect_sites.py:6
↓ 1 callersFunctioninspect
(name: str, url: str)
inspect_articles.py:6
↓ 1 callersFunctionmain
()
inspect_sites.py:51
↓ 1 callersFunctionmain
()
inspect_clashmeta.py:9
↓ 1 callersFunctionmain
()
main.py:34
↓ 1 callersFunctionmain
()
inspect_articles.py:46
↓ 1 callersFunctionparse_args
()
main.py:21
↓ 1 callersFunctionprocess_txt
Decode base64 v2ray 节点,按行 hash 去重.
src/pipeline.py:7
↓ 1 callersMethodrun
Run the full site processing pipeline.
src/site_processor.py:42
↓ 1 callersFunctionsave_config
Persist config, preserving link_pattern and llm section.
src/config.py:65
↓ 1 callersMethodverify_pattern
Three-layer verification: syntax, recall, precision.
src/llm_router.py:182
↓ 1 callersFunctionwrite_readme
Generate and write README.md.
src/readme_updater.py:98
Method__init__
(self, site: SiteConfig, config: Config, llm: LLMRouter)
src/site_processor.py:33
Method__init__
(self, config: Config)
src/scheduler.py:24
Method__init__
(self, nodes_dir: str = "nodes")
src/merger.py:49
Method__init__
(self, max_failures: int = 5, cooldown_seconds: int = 1800)
src/llm_router.py:52
Method__init__
(self, config: Config, timeout_s: int = 20)
src/llm_router.py:88
Method__init__
(self, content: str | None, reasoning: str | None = None)
tests/test_llm_router.py:170
Method__init__
(self, content: str | None, reasoning: str | None = None)
tests/test_llm_router.py:176
Method__init__
(self, content: str | None)
tests/test_llm_router.py:181
Method_run_one
(site: SiteConfig)
src/scheduler.py:44
Methodalways_fail
(cfg, prompt, mt)
tests/test_llm_router.py:306
Functionconfig_with_llm
()
tests/test_site_processor.py:28
Methodempty_ask
(p, task_type="default", max_tokens=256)
tests/test_llm_router.py:378
Methodfake_ask
(prompt, task_type="default", max_tokens=1024)
tests/test_site_processor.py:219
Methodfake_ask
(prompt, task_type="default", max_tokens=1024)
tests/test_llm_router.py:363
Methodfake_download
(url)
tests/test_site_processor.py:288
Methodfake_gen
(links, html)
tests/test_site_processor.py:239
Methodfake_run
(self)
tests/test_scheduler.py:97
Functionfake_try
(cfg, prompt, max_tokens)
tests/test_llm_router.py:220
Methodfake_try
(cfg, prompt, mt)
tests/test_llm_router.py:267
Functionfull_config
()
tests/test_llm_router.py:22
Functionno_llm_config
()
tests/test_llm_router.py:28
Functionscheduler
(three_site_config)
tests/test_scheduler.py:30
Functionsite_cfg
()
tests/test_site_processor.py:18
Methodtest_ask_falls_back_on_failure
Both providers tried when first fails; second succeeds.
tests/test_llm_router.py:274
Methodtest_ask_returns_empty_when_all_fail
When every provider fails, return empty string (never raise).
tests/test_llm_router.py:303
Methodtest_ask_returns_empty_when_no_providers
Router with empty provider list returns empty string.
tests/test_llm_router.py:234
Methodtest_ask_returns_text_on_first_success
When the first provider succeeds, return its text immediately.
tests/test_llm_router.py:246
Methodtest_auto_recovery_after_cooldown
(self)
tests/test_llm_router.py:141
Methodtest_basic_extraction
(self)
tests/test_site_processor.py:73
Methodtest_case_insensitive
(self)
tests/test_merger.py:79
Methodtest_cerebras_is_reasoning_model
(self, full_config)
tests/test_llm_router.py:441
Methodtest_chinese_full_date
(self)
tests/test_site_processor.py:107
Methodtest_chinese_month_day
(self)
tests/test_site_processor.py:104
Methodtest_cleans_trailing_punctuation
(self)
tests/test_site_processor.py:86
Methodtest_compact_date_in_url
(self)
tests/test_site_processor.py:116
Methodtest_compact_date_in_url_with_filename
(self)
tests/test_site_processor.py:119
Methodtest_dedup_by_server_port_type
(self)
tests/test_merger.py:16
Methodtest_default_values
(self)
tests/test_site_processor.py:313
Methodtest_defaults
(self)
tests/test_merger.py:160
Methodtest_disabled_after_max_failures
(self)
tests/test_llm_router.py:112
Methodtest_distribution_matches_weights
Statistical: 10,000 picks should approximate the weight ratio.
tests/test_llm_router.py:77
Methodtest_empty_blog_links
(self, site_cfg, config_with_llm)
tests/test_site_processor.py:186
Methodtest_empty_html
(self)
tests/test_site_processor.py:91
Methodtest_empty_list
(self)
tests/test_merger.py:42
Methodtest_empty_names
(self)
tests/test_merger.py:85
Methodtest_empty_results
(self, scheduler, capsys)
tests/test_scheduler.py:64
Methodtest_exclude_all_returns_none
(self)
tests/test_llm_router.py:96
Methodtest_extract_links_calls_ask
Ensure extract_links flows through ask().
tests/test_llm_router.py:358
next →1–100 of 175, ranked by callers