(text: str)
| 116 | |
| 117 | |
| 118 | def _clean(text: str) -> str: |
| 119 | text = re.sub(r'\n{3,}', '\n\n', text) |
| 120 | text = re.sub(r'(?i)buy together.*', '', text, flags=re.DOTALL) |
| 121 | text = re.sub(r'CHF \d+.*', '', text) |
| 122 | text = re.sub(r'English \| PDF.*', '', text) |
| 123 | text = re.sub(r'\*\*Read sample\*\*.*', '', text, flags=re.DOTALL) |
| 124 | text = text.strip() |
| 125 | return text |
| 126 | |
| 127 | |
| 128 | def _extract_general_info(text: str) -> str: |
no outgoing calls
no test coverage detected