|
|
<?php
|
|
|
|
|
|
return [
|
|
|
'arxiv' => [
|
|
|
/** arXiv 要求在 User-Agent 中提供可联系邮箱 */
|
|
|
'contact_email' => env('ARXIV_CONTACT_EMAIL', env('MAIL_FROM_ADDRESS', 'support@example.com')),
|
|
|
/** 两次 arXiv 请求最小间隔(秒),官方要求 ≥3 */
|
|
|
'min_interval_seconds' => (float) env('ARXIV_MIN_INTERVAL', 3),
|
|
|
/** 列表/API 请求超时 */
|
|
|
'http_timeout_seconds' => (int) env('ARXIV_HTTP_TIMEOUT', 45),
|
|
|
'connect_timeout_seconds' => (int) env('ARXIV_HTTP_CONNECT_TIMEOUT', 15),
|
|
|
/** 单篇 abs/html 补全请求超时(宜短于 API 超时) */
|
|
|
'enrich_http_timeout_seconds' => (int) env('ARXIV_ENRICH_HTTP_TIMEOUT', 25),
|
|
|
/** 是否访问 abs/html 补全 */
|
|
|
'abs_enrich_enabled' => (bool) env('ARXIV_ABS_ENRICH', true),
|
|
|
/**
|
|
|
* auto:已有发表日期+高校则跳过;always:每篇都补(慢);never:不补(最快)
|
|
|
*/
|
|
|
'abs_enrich_mode' => env('ARXIV_ABS_ENRICH_MODE', 'auto'),
|
|
|
/** 单次任务最多补全篇数(每篇至多 1 次 arXiv 页面请求) */
|
|
|
'abs_enrich_max' => (int) env('ARXIV_ABS_ENRICH_MAX', 8),
|
|
|
/** 补全时优先 HTML 版(机构更全),失败再试 abs */
|
|
|
'enrich_prefer_html' => (bool) env('ARXIV_ENRICH_PREFER_HTML', true),
|
|
|
'try_html_version' => (bool) env('ARXIV_TRY_HTML_VERSION', true),
|
|
|
/** abs/html 页面缓存秒数,重复抓取同 ID 时加速 */
|
|
|
'page_cache_seconds' => (int) env('ARXIV_PAGE_CACHE_SECONDS', 86400),
|
|
|
/** 为 true 时跳过 export API,仅用搜索页(1 次请求,最快但字段较少) */
|
|
|
'prefer_html_search' => (bool) env('ARXIV_PREFER_HTML', false),
|
|
|
],
|
|
|
|
|
|
'faculty' => [
|
|
|
/** 列表项无邮箱时,是否请求教师主页补全邮箱 */
|
|
|
'profile_email_enrich_enabled' => (bool) env('FACULTY_PROFILE_EMAIL_ENRICH', true),
|
|
|
'profile_http_timeout_seconds' => (int) env('FACULTY_PROFILE_HTTP_TIMEOUT', 20),
|
|
|
/** 并发请求教师主页数 */
|
|
|
'profile_enrich_pool_size' => (int) env('FACULTY_PROFILE_ENRICH_POOL', 6),
|
|
|
],
|
|
|
];
|