mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-08-14 06:47:28 +00:00
Ignore malformed feed probe candidates (#43)
Co-authored-by: Codex Microtask Operator <codex-microtask@example.com>
This commit is contained in:
parent
fbf4d76372
commit
ffefd364ce
2 changed files with 19 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ function candidateUrls(query: FeedDiscoveryQuery, configured: string[]) {
|
|||
|
||||
for (const entry of configured) {
|
||||
const [url, ...keywords] = entry.split("|").map((part) => part.trim());
|
||||
if (!url) {
|
||||
if (!/^https?:\/\//i.test(url)) {
|
||||
continue;
|
||||
}
|
||||
if (keywords.length === 0 || keywords.some((keyword) => query.q.toLowerCase().includes(keyword.toLowerCase()))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue