class TikToker::Client::PortalClient

Defined in:

tiktoker/client/portal_client.cr

Constant Summary

INITIAL_PROPS_REGEX = /<script id="__NEXT_DATA__".*?>(.*?)<\/script>/
REGEX_MATCH_POS = 1
USER_AGENT = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

Instance Method Summary

Instance Method Detail

def find_user(username : String) : TikTok::InitialProps #

Find an user by username.

client = Client::PortalClient.new
client.find_user("charlidamelio") # => TikTok::UserProfile

[View source]