Merge pull request #2497 from UlyssesZh/match-links-outside-a-tags

feat: add option to match links outside <a> tags even if links in <a> tags are found
This commit is contained in:
Imran
2025-08-31 00:00:20 -04:00
committed by GitHub
29 changed files with 37 additions and 1 deletions

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "التحقق من علامة 'الأحدث'",
"intermediateLinkRegex": "تصفية للوصول إلى رابط 'وسيط'",
"filterByLinkText": "تصفية الروابط حسب نص الرابط",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "لم يتم العثور على رابط وسيط",
"intermediateLink": "رابط وسيط",
"exemptFromBackgroundUpdates": "إعفاء من التحديثات في الخلفية (إذا تم تمكينها)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Provjerite 'posljednu' ('latest') oznaku",
"intermediateLinkRegex": "Filter za 'srednju' vezu za posjetu",
"filterByLinkText": "Filtriraj linkove prema tekstu linka",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Intermediate veza nije nađena",
"intermediateLink": "Intermediate veza",
"exemptFromBackgroundUpdates": "Izuzmi iz ažuriranja u pozadini (ako su uključeni)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Comprova l'etiqueta 'Latest' (última versió)",
"intermediateLinkRegex": "Filtra per un enllaç 'intermediari' per anar-hi",
"filterByLinkText": "Filtra els enllaços pel text de l'enllaç",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "No s'ha trobat l'enllaç intermediari",
"intermediateLink": "Enllaç intermediari",
"exemptFromBackgroundUpdates": "Exempta d'actualitzacions en segon pla (si han estat habilitades)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Ověřit značku „latest“",
"intermediateLinkRegex": "Filtr pro návštěvu „prostředního“ odkazu",
"filterByLinkText": "Filtrovat odkazy podle textu odkazu",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Připojený odkaz nenalezen",
"intermediateLink": "Připojený odkaz",
"exemptFromBackgroundUpdates": "Vyloučit z aktualizací na pozadí (je-li povoleno)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verificer 'seneste'-tagget",
"intermediateLinkRegex": "Filtrer efter et 'mellemliggende' link at besøge",
"filterByLinkText": "Filtrer links efter linktekst",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Mellemliggende link ikke fundet",
"intermediateLink": "Mellemliggende link",
"exemptFromBackgroundUpdates": "Undtag fra baggrundsopdateringer (hvis aktiveret)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "„Latest“-Tag überprüfen",
"intermediateLinkRegex": "Filter für einen „Zwischen“-Link, der zuerst besucht werden soll",
"filterByLinkText": "Links durch Linktext filtern",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "„Zwischen“-Link nicht gefunden",
"intermediateLink": "„Zwischen“-Link",
"exemptFromBackgroundUpdates": "Von Hintergrundaktualisierungen (falls aktiviert) ausschließen",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Inspekti la etikedon 'latest'",
"intermediateLinkRegex": "Filtri por 'pera' vizitota ligilo",
"filterByLinkText": "Filtri ligilojn laŭ ligiloteksto",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Netrovebla pera ligilo",
"intermediateLink": "Pera ligilo",
"exemptFromBackgroundUpdates": "Escepti el la fonaj ĝisdatigoj (se aktiva)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verify the 'latest' tag",
"intermediateLinkRegex": "Filter for an 'intermediate' link to visit",
"filterByLinkText": "Filter links by link text",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Intermediate link not found",
"intermediateLink": "Intermediate link",
"exemptFromBackgroundUpdates": "Exempt from background updates (if enabled)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Comprobar etiqueta 'Latest'",
"intermediateLinkRegex": "Filtrar por enlace 'intermedio' para visitar primero",
"filterByLinkText": "Filtrar enlaces por texto del enlace",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Enlace intermedio no encontrado",
"intermediateLink": "Enlace intermedio",
"exemptFromBackgroundUpdates": "No actualizar en segundo plano (si está habilitado)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "برچسب \"آخرین\" را تأیید کنید",
"intermediateLinkRegex": "برای بازدید از پیوند «میانگین» فیلتر کنید",
"filterByLinkText": "لینک ها را بر اساس متن پیوند فیلتر کنید",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "لینک میانی پیدا نشد",
"intermediateLink": "پیوند میانی",
"exemptFromBackgroundUpdates": "معاف از به‌روزرسانی‌های پس‌زمینه (در صورت فعال بودن)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Vérifier la balise 'latest'",
"intermediateLinkRegex": "Filtrer un lien 'intermédiaire' à visiter",
"filterByLinkText": "Filtrer les liens par texte du lien",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Lien intermédiaire introuvable",
"intermediateLink": "Lien intermédiaire",
"exemptFromBackgroundUpdates": "Exclure des mises à jour en arrière-plan (si activées)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Ellenőrizze a „legújabb” címkét",
"intermediateLinkRegex": "Szűrő egy „köztes” hivatkozás felkereséséhez",
"filterByLinkText": "Hivatkozások szűrése hivatkozásszöveg alapján",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Köztes hivatkozás nem található",
"intermediateLink": "Köztes hivatkozás",
"exemptFromBackgroundUpdates": "Mentes a háttérben történő frissítések alól (ha engedélyezett)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verifikasi label 'terbaru'",
"intermediateLinkRegex": "Filter tautan 'perantara' untuk dikunjungi",
"filterByLinkText": "Filter tautan berdasarkan teks tautan",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Tautan perantara tidak ditemukan",
"intermediateLink": "Tautan perantara",
"exemptFromBackgroundUpdates": "Dikecualikan dari pembaruan latar belakang (jika diaktifkan)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verifica l'etichetta 'Latest'",
"intermediateLinkRegex": "Filtro per un collegamento 'intermedio' da visitare",
"filterByLinkText": "Filtra i collegamenti in base al testo del collegamento",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Link intermedio non trovato",
"intermediateLink": "Collegamento intermedio",
"exemptFromBackgroundUpdates": "Esente da aggiornamenti in secondo piano (se attivo)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "'latest'タグを確認する",
"intermediateLinkRegex": "訪問する「中間」リンクのフィルター",
"filterByLinkText": "テキストでリンクをフィルタリングする",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "中間リンクが見つかりませんでした",
"intermediateLink": "中間リンク",
"exemptFromBackgroundUpdates": "バックグラウンドアップデートを行わない (有効な場合)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "'최신' 태그 확인",
"intermediateLinkRegex": "'중간' 링크 방문 필터",
"filterByLinkText": "링크 텍스트로 링크 필터링",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "중간 링크를 찾을 수 없습니다",
"intermediateLink": "중간 링크",
"exemptFromBackgroundUpdates": "백그라운드 업데이트에서 제외 (활성화된 경우)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "'ഏറ്റവും പുതിയ' ടാഗ് പരിശോധിക്കുക",
"intermediateLinkRegex": "സന്ദർശിക്കാൻ ഒരു 'ഇന്റർമീഡിയറ്റ്' ലിങ്കിനായി ഫിൽട്ടർ ചെയ്യുക",
"filterByLinkText": "ലിങ്ക് ടെക്സ്റ്റ് ഉപയോഗിച്ച് ലിങ്കുകൾ ഫിൽട്ടർ ചെയ്യുക",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "ഇന്റർമീഡിയറ്റ് ലിങ്ക് കണ്ടെത്തിയില്ല",
"intermediateLink": "ഇന്റർമീഡിയറ്റ് ലിങ്ക്",
"exemptFromBackgroundUpdates": "ബാക്ക്ഗ്രൗണ്ട് അപ്‌ഡേറ്റുകളിൽ നിന്ന് ഒഴിവാക്കുക (പ്രവർത്തനക്ഷമമാക്കിയിട്ടുണ്ടെങ്കിൽ)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Het label 'Laatste' verifiëren",
"intermediateLinkRegex": "Filteren op een 'Intermediaire' link om te bezoeken",
"filterByLinkText": "Links filteren op linktekst",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Intermediaire link niet gevonden",
"intermediateLink": "Intermediaire link",
"exemptFromBackgroundUpdates": "Vrijgesteld van achtergrond-updates (indien ingeschakeld)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Zweryfikuj najnowszy tag",
"intermediateLinkRegex": "Filtr linków \"pośrednich\" do odwiedzenia w pierwszej kolejności",
"filterByLinkText": "Filtruj linki według tekstu linku",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Nie znaleziono linku pośredniego",
"intermediateLink": "Link pośredni",
"exemptFromBackgroundUpdates": "Wyklucz z uaktualnień w tle (jeśli są włączone)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verificar a tag 'mais recente'",
"intermediateLinkRegex": "Filtrar por um link 'intermediário' para visitar",
"filterByLinkText": "Filtrar links por texto do link",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Link intermediário não encontrado",
"intermediateLink": "Link intermediário",
"exemptFromBackgroundUpdates": "Isento de atualizações em segundo plano (caso ativadas)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verifique a 'última' etiqueta",
"intermediateLinkRegex": "Filtrar um link 'intermediário' para visitar",
"filterByLinkText": "Filtrar links pelo texto do link",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Link intermediário não encontrado",
"intermediateLink": "Link intermediário",
"exemptFromBackgroundUpdates": "Isento de atualizações em segundo-plano (se ativadas)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Проверять метку «latest»",
"intermediateLinkRegex": "Фильтр для «промежуточной» ссылки для посещения",
"filterByLinkText": "Фильтрация ссылок по тексту ссылки",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Промежуточная ссылка не найдена",
"intermediateLink": "Промежуточная ссылка",
"exemptFromBackgroundUpdates": "Исключить из фоновых обновлений (если включено)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Verifiera 'senaste'-taggen",
"intermediateLinkRegex": "Filtrera för en \"mellanliggande\" länk att besöka",
"filterByLinkText": "Filtrera länkar efter länktext",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Mellanlänk hittades inte",
"intermediateLink": "Mellanlänk",
"exemptFromBackgroundUpdates": "Undta från bakgrundsuppdateringar (om aktiverad)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "'latest' etiketini doğrula",
"intermediateLinkRegex": "Ziyaret Edilecek 'Orta Düzey' Bağlantıyı Filtrele",
"filterByLinkText": "Bağlantıları bağlantı metnine göre filtrele",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Ara bağlantı bulunamadı",
"intermediateLink": "Ara bağlantı",
"exemptFromBackgroundUpdates": "Arka plan güncellemelerinden muaf tut (etkinse)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Перевірити тег 'latest'",
"intermediateLinkRegex": "Фільтр для 'Проміжного' Посилання для Відвідування",
"filterByLinkText": "Фільтрувати посилання за текстом посилання",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Проміжне посилання не знайдено",
"intermediateLink": "Проміжне посилання",
"exemptFromBackgroundUpdates": "Виключено з фонових оновлень (якщо ввімкнено)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "Xác minh thẻ 'mới nhất'",
"intermediateLinkRegex": "Lọc tìm liên kết 'Trung cấp' để truy cập",
"filterByLinkText": "Lọc liên kết theo văn bản liên kết",
"matchLinksOutsideATags": "Match links outside <a> tags",
"intermediateLinkNotFound": "Không tìm thấy liên kết trung gian",
"intermediateLink": "Liên kết trung gian",
"exemptFromBackgroundUpdates": "Miễn cập nhật nền (nếu được bật)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "驗證「最新」標籤",
"intermediateLinkRegex": "過濾要存取的「中間」連結",
"filterByLinkText": "按連結文字過濾連結",
"matchLinksOutsideATags": "匹配 <a> 標籤外的連結",
"intermediateLinkNotFound": "沒有找到中間連結",
"intermediateLink": "中間連結",
"exemptFromBackgroundUpdates": "免除背景更新(若已啟用)",

View File

@@ -254,6 +254,7 @@
"verifyLatestTag": "验证“Latest”标签",
"intermediateLinkRegex": "筛选中转链接的正则表达式",
"filterByLinkText": "根据链接文本进行筛选",
"matchLinksOutsideATags": "匹配 <a> 标签外的链接",
"intermediateLinkNotFound": "未找到中转链接",
"intermediateLink": "中转链接",
"exemptFromBackgroundUpdates": "禁用后台更新(仅此应用生效,即使已启用全局后台更新)",

View File

@@ -129,6 +129,8 @@ Future<List<MapEntry<String, String>>> grabLinksCommon(
Uri reqUrl,
Map<String, dynamic> additionalSettings,
) async {
bool matchLinksOutsideATags =
additionalSettings['matchLinksOutsideATags'] == true;
var html = parse(rawBody);
List<MapEntry<String, String>> allLinks = html
.querySelectorAll('a')
@@ -143,7 +145,7 @@ Future<List<MapEntry<String, String>>> grabLinksCommon(
.where((element) => element.key.isNotEmpty)
.map((e) => MapEntry(ensureAbsoluteUrl(e.key, reqUrl), e.value))
.toList();
if (allLinks.isEmpty) {
if (allLinks.isEmpty || matchLinksOutsideATags) {
allLinks = getLinksInLines(rawBody);
}
if (allLinks.isEmpty) {
@@ -247,6 +249,12 @@ class HTML extends AppSource {
];
var commonFormItems = [
[GeneratedFormSwitch('filterByLinkText', label: tr('filterByLinkText'))],
[
GeneratedFormSwitch(
'matchLinksOutsideATags',
label: tr('matchLinksOutsideATags')
),
],
[GeneratedFormSwitch('skipSort', label: tr('skipSort'))],
[GeneratedFormSwitch('reverseSort', label: tr('takeFirstLink'))],
[