mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use nitter handler for twitter new domain x.com
This commit is contained in:
parent
2e1c99780a
commit
29cb15de32
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ interface Tweet {
|
|||
export class NitterHandler extends ContentHandler {
|
||||
// matches twitter.com and nitter.net urls
|
||||
URL_MATCH =
|
||||
/((twitter\.com)|(nitter\.net))\/(?:#!\/)?(\w+)\/status(?:es)?\/(\d+)(?:\/.*)?/
|
||||
/((x\.com)|(twitter\.com)|(nitter\.net))\/(?:#!\/)?(\w+)\/status(?:es)?\/(\d+)(?:\/.*)?/
|
||||
INSTANCES = [
|
||||
{ value: 'https://nitter.moomoo.me', score: 0 },
|
||||
{ value: 'https://nitter.net', score: 1 }, // the official instance
|
||||
|
|
@ -316,7 +316,7 @@ export class NitterHandler extends ContentHandler {
|
|||
parseTweetUrl = (url: string) => {
|
||||
const match = url.match(this.URL_MATCH)
|
||||
return {
|
||||
domain: match?.[1],
|
||||
domain: match?.[1]?.replace('x', 'twitter'),
|
||||
username: match?.[4],
|
||||
tweetId: match?.[5],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue