Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Barabama/FreeNodes
/ functions
Functions
175 in github.com/Barabama/FreeNodes
⨍
Functions
175
◇
Types & classes
37
↓ 13 callers
Method
record_failure
(self, provider: str)
src/llm_router.py:62
↓ 11 callers
Method
is_healthy
(self, provider: str)
src/llm_router.py:67
↓ 10 callers
Function
make_page
(url: str = "http://x", links: list | None = None, markdown: str = "", html: str = "", success:
tests/test_site_processor.py:45
↓ 10 callers
Method
pick
(weights: dict[str, int], is_healthy: callable, exclude: set[str] | None = None)
src/llm_router.py:28
↓ 9 callers
Method
_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 callers
Method
_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 callers
Method
_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 callers
Method
run
Run all three merge stages and return results.
src/merger.py:52
↓ 6 callers
Method
_dedup_proxies
Deduplicate by server:port:type; rename name collisions with _N suffix.
src/merger.py:221
↓ 6 callers
Method
_detect
Helper to call the static method.
tests/test_merger.py:57
↓ 6 callers
Method
_extract_by_pattern
Extract subscription URLs matching *pattern*.
src/site_processor.py:287
↓ 6 callers
Method
ask
Send *prompt* through weighted routing. Returns empty when all fail.
src/llm_router.py:115
↓ 5 callers
Method
_extract_links
Extract subscription links from an article page. Returns (links, pattern_saved).
src/site_processor.py:181
↓ 5 callers
Method
_parse_json
Parse LLM JSON response. Strips markdown fences if present.
src/llm_router.py:279
↓ 5 callers
Method
_resolve_sites
Resolve target string to a list of SiteConfig.
src/scheduler.py:82
↓ 5 callers
Method
_response_text
(resp, is_reasoning: bool)
src/llm_router.py:242
↓ 5 callers
Method
run
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 callers
Method
_derive_base
Extract scheme + host from a URL for resolving relative links.
src/site_processor.py:314
↓ 4 callers
Method
_download_retry
Download a file with retry.
src/site_processor.py:301
↓ 4 callers
Method
_print_summary
(result: MergeResult)
src/merger.py:325
↓ 3 callers
Function
_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 callers
Function
load_config
Load config from YAML file. Missing llm section yields empty LLMConfig.
src/config.py:49
↓ 3 callers
Method
record_success
(self, provider: str)
src/llm_router.py:58
↓ 2 callers
Method
_base_clash_config
Return shared Clash base config dict. Used by both ``_merge_yaml`` and ``_build_provider``.
src/merger.py:297
↓ 2 callers
Method
_detect_regions
Group proxy names by region keywords. Returns dict of region_label -> [proxy_name]. Unmatched names go into "🌍 其他".
src/merger.py:267
↓ 2 callers
Method
_header
Generate a YAML comment header.
src/merger.py:286
↓ 2 callers
Method
extract_links
Extract subscription links from page markdown. Looks for downloadable subscription files (.txt/.yaml URLs), subscription service URLs
src/llm_router.py:135
↓ 2 callers
Function
fetch_page
Crawl4AI 爬取页面,返回结构化内容.
src/crawler.py:17
↓ 2 callers
Method
generate_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 callers
Function
save
输出到 nodes/{site}.{ext}.
src/pipeline.py:27
↓ 1 callers
Method
_build_default_groups
Build two default proxy groups: url-test + select.
src/merger.py:249
↓ 1 callers
Method
_build_provider
Build a Clash Meta config using proxy-provider references.
src/merger.py:136
↓ 1 callers
Method
_merge_txt
Concatenate all .txt files, dedup by line hash.
src/merger.py:63
↓ 1 callers
Method
_merge_yaml
Extract proxies from all .yaml files, dedup, rebuild groups.
src/merger.py:102
↓ 1 callers
Method
_print_summary
Print a summary table of all site results.
src/scheduler.py:92
↓ 1 callers
Method
_try_provider
(self, cfg: ProviderConfig, prompt: str, max_tokens: int)
src/llm_router.py:217
↓ 1 callers
Method
_validate_routing
Warn if task_routing references provider names not in the provider list.
src/llm_router.py:101
↓ 1 callers
Function
build_readme
Generate README.md with subscription table from config site list.
src/readme_updater.py:13
↓ 1 callers
Function
download_file
httpx 下载文件,加大 read timeout 避免大 yaml 超时.
src/crawler.py:49
↓ 1 callers
Method
health_report
(self)
src/llm_router.py:75
↓ 1 callers
Function
inspect
(name: str, url: str)
inspect_sites.py:6
↓ 1 callers
Function
inspect
(name: str, url: str)
inspect_articles.py:6
↓ 1 callers
Function
main
()
inspect_sites.py:51
↓ 1 callers
Function
main
()
inspect_clashmeta.py:9
↓ 1 callers
Function
main
()
main.py:34
↓ 1 callers
Function
main
()
inspect_articles.py:46
↓ 1 callers
Function
parse_args
()
main.py:21
↓ 1 callers
Function
process_txt
Decode base64 v2ray 节点,按行 hash 去重.
src/pipeline.py:7
↓ 1 callers
Method
run
Run the full site processing pipeline.
src/site_processor.py:42
↓ 1 callers
Function
save_config
Persist config, preserving link_pattern and llm section.
src/config.py:65
↓ 1 callers
Method
verify_pattern
Three-layer verification: syntax, recall, precision.
src/llm_router.py:182
↓ 1 callers
Function
write_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
Method
always_fail
(cfg, prompt, mt)
tests/test_llm_router.py:306
Function
config_with_llm
()
tests/test_site_processor.py:28
Method
empty_ask
(p, task_type="default", max_tokens=256)
tests/test_llm_router.py:378
Method
fake_ask
(prompt, task_type="default", max_tokens=1024)
tests/test_site_processor.py:219
Method
fake_ask
(prompt, task_type="default", max_tokens=1024)
tests/test_llm_router.py:363
Method
fake_download
(url)
tests/test_site_processor.py:288
Method
fake_gen
(links, html)
tests/test_site_processor.py:239
Method
fake_run
(self)
tests/test_scheduler.py:97
Function
fake_try
(cfg, prompt, max_tokens)
tests/test_llm_router.py:220
Method
fake_try
(cfg, prompt, mt)
tests/test_llm_router.py:267
Function
full_config
()
tests/test_llm_router.py:22
Function
no_llm_config
()
tests/test_llm_router.py:28
Function
scheduler
(three_site_config)
tests/test_scheduler.py:30
Function
site_cfg
()
tests/test_site_processor.py:18
Method
test_ask_falls_back_on_failure
Both providers tried when first fails; second succeeds.
tests/test_llm_router.py:274
Method
test_ask_returns_empty_when_all_fail
When every provider fails, return empty string (never raise).
tests/test_llm_router.py:303
Method
test_ask_returns_empty_when_no_providers
Router with empty provider list returns empty string.
tests/test_llm_router.py:234
Method
test_ask_returns_text_on_first_success
When the first provider succeeds, return its text immediately.
tests/test_llm_router.py:246
Method
test_auto_recovery_after_cooldown
(self)
tests/test_llm_router.py:141
Method
test_basic_extraction
(self)
tests/test_site_processor.py:73
Method
test_case_insensitive
(self)
tests/test_merger.py:79
Method
test_cerebras_is_reasoning_model
(self, full_config)
tests/test_llm_router.py:441
Method
test_chinese_full_date
(self)
tests/test_site_processor.py:107
Method
test_chinese_month_day
(self)
tests/test_site_processor.py:104
Method
test_cleans_trailing_punctuation
(self)
tests/test_site_processor.py:86
Method
test_compact_date_in_url
(self)
tests/test_site_processor.py:116
Method
test_compact_date_in_url_with_filename
(self)
tests/test_site_processor.py:119
Method
test_dedup_by_server_port_type
(self)
tests/test_merger.py:16
Method
test_default_values
(self)
tests/test_site_processor.py:313
Method
test_defaults
(self)
tests/test_merger.py:160
Method
test_disabled_after_max_failures
(self)
tests/test_llm_router.py:112
Method
test_distribution_matches_weights
Statistical: 10,000 picks should approximate the weight ratio.
tests/test_llm_router.py:77
Method
test_empty_blog_links
(self, site_cfg, config_with_llm)
tests/test_site_processor.py:186
Method
test_empty_html
(self)
tests/test_site_processor.py:91
Method
test_empty_list
(self)
tests/test_merger.py:42
Method
test_empty_names
(self)
tests/test_merger.py:85
Method
test_empty_results
(self, scheduler, capsys)
tests/test_scheduler.py:64
Method
test_exclude_all_returns_none
(self)
tests/test_llm_router.py:96
Method
test_extract_links_calls_ask
Ensure extract_links flows through ask().
tests/test_llm_router.py:358
next →
1–100 of 175, ranked by callers