mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 15:19:32 +00:00
Merge branch 'zedeus:master' into master
This commit is contained in:
commit
162a15f7a8
40 changed files with 1552 additions and 178 deletions
|
|
@ -34,7 +34,7 @@ proc initQuery*(pms: Table[string, string]; name=""): Query =
|
|||
|
||||
proc getMediaQuery*(name: string): Query =
|
||||
Query(
|
||||
kind: media,
|
||||
kind: QueryKind.media,
|
||||
filters: @["twimg", "native_video"],
|
||||
fromUser: @[name],
|
||||
sep: "OR"
|
||||
|
|
@ -64,7 +64,7 @@ proc genQueryParam*(query: Query; maxId=""): string =
|
|||
else:
|
||||
param &= ")"
|
||||
|
||||
if query.fromUser.len > 0 and query.kind in {posts, media}:
|
||||
if query.fromUser.len > 0 and query.kind in {posts, QueryKind.media}:
|
||||
param &= " (filter:self_threads OR -filter:replies)"
|
||||
|
||||
if "nativeretweets" notin query.excludes:
|
||||
|
|
@ -104,7 +104,9 @@ proc genQueryUrl*(query: Query): string =
|
|||
if query.view.len > 0:
|
||||
params.add "view=" & encodeUrl(query.view)
|
||||
|
||||
if query.kind in {tweets, users}:
|
||||
# media doubles as the profile media tab, where f isn't part of the URL scheme
|
||||
if query.kind in {tweets, users, lists, top} or
|
||||
(query.kind == QueryKind.media and query.fromUser.len == 0):
|
||||
params.add &"f={query.kind}"
|
||||
if query.text.len > 0:
|
||||
params.add "q=" & encodeUrl(query.text)
|
||||
|
|
|
|||
Loading…
Reference in a new issue