Add workaround for Twitter's layout A/B testing

Fixes #110
This commit is contained in:
Zed
2020-01-19 08:34:32 +01:00
parent 6b16ad2ce0
commit ba57511a01
10 changed files with 43 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ proc getTweet*(username, id, after, agent: string): Future[Conversation] {.async
headers = genHeaders({
"pragma": "no-cache",
"x-previous-page-name": "profile"
}, agent, base, xml=true)
}, agent, base, xml=true, guestId=true)
url = base / username / tweetUrl / id ? {"max_position": after}
html = await fetchHtml(url, headers)