| 152 | def _xml_text(node: ET.Element, *paths: str) -> str: |
| 153 | namespaces = { |
| 154 | "atom": "http://www.w3.org/2005/Atom", |
| 155 | "dc": "http://purl.org/dc/elements/1.1/", |
| 156 | } |
| 157 | for path in paths: |
| 158 | try: |
| 159 | found = node.find(path, namespaces) |
| 160 | except SyntaxError: |
| 161 | found = None |
| 162 | if found is not None and found.text: |
| 163 | return found.text.strip() |
| 164 | return "" |
| 165 | |
| 166 | |
| 167 | def fetch_custom_rss_papers(urls: List[str], limit_per_source: int) -> List[Dict]: |
| 168 | """Fetch user-configured RSS/Atom sources for the desktop offline GUI.""" |
| 169 | if not urls: |