mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 19:46:28 +00:00
Fix username regex, add media endpoint
This commit is contained in:
parent
632a2c6c82
commit
b51f1cbbd4
2 changed files with 5 additions and 2 deletions
|
@ -11,7 +11,10 @@ const
|
||||||
base = parseUri("https://twitter.com/")
|
base = parseUri("https://twitter.com/")
|
||||||
apiBase = parseUri("https://api.twitter.com/1.1/")
|
apiBase = parseUri("https://api.twitter.com/1.1/")
|
||||||
|
|
||||||
timelineUrl = "i/profiles/show/$1/timeline/tweets?include_available_features=1&include_entities=1&include_new_items_bar=true"
|
timelineParams = "?include_available_features=1&include_entities=1&include_new_items_bar=false&reset_error_state=false"
|
||||||
|
showUrl = "i/profiles/show/$1" & timelineParams
|
||||||
|
timelineUrl = showUrl % "$1/timeline/tweets"
|
||||||
|
timelineMediaUrl = showUrl % "$1/media_timeline"
|
||||||
profilePopupUrl = "i/profiles/popup"
|
profilePopupUrl = "i/profiles/popup"
|
||||||
profileIntentUrl = "intent/user"
|
profileIntentUrl = "intent/user"
|
||||||
tweetUrl = "i/status/"
|
tweetUrl = "i/status/"
|
||||||
|
|
|
@ -8,7 +8,7 @@ from unicode import Rune, `$`
|
||||||
const
|
const
|
||||||
urlRegex = re"((https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s\)]*)?)"
|
urlRegex = re"((https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s\)]*)?)"
|
||||||
emailRegex = re"([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)"
|
emailRegex = re"([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)"
|
||||||
usernameRegex = re"(^|[^\S]|\.|>)@([A-z0-9_]+)"
|
usernameRegex = re"(^|[\s\.,>])@([A-z0-9_]+)"
|
||||||
picRegex = re"pic.twitter.com/[^ ]+"
|
picRegex = re"pic.twitter.com/[^ ]+"
|
||||||
cardRegex = re"(https?://)?cards.twitter.com/[^ ]+"
|
cardRegex = re"(https?://)?cards.twitter.com/[^ ]+"
|
||||||
ellipsisRegex = re" ?…"
|
ellipsisRegex = re" ?…"
|
||||||
|
|
Loading…
Reference in a new issue