()
| 76 | } |
| 77 | |
| 78 | createAppParser() { |
| 79 | const hostname = this.url.hostname |
| 80 | const app = SUPPORTED_APPS.find((app) => app.matchHostname.test(hostname)) |
| 81 | |
| 82 | if (!app) return null |
| 83 | |
| 84 | const Parser = ParserModules[app.id as keyof typeof ParserModules] |
| 85 | if (!Parser) return null |
| 86 | |
| 87 | return new Parser(app, this.url) as WebAppExtractor |
| 88 | } |
| 89 | |
| 90 | useFallbackParser(document: Document) { |
| 91 | const articleParser = new ArticleParser(this.url) |
no outgoing calls
no test coverage detected