diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dbac8f..92899d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ## v0.0.13 +01.10.2024 + - Added methods `GetTweetsAndReplies`, `FetchTweetsAndReplies`, `FetchTweetsAndRepliesByUserID` thanks to @thewh1teagle - Added methods `GetAccountSettings` and `GetAccountList` thanks to @thewh1teagle +- Added methods `GetUserAgent` and `SetUserAgent` ## v0.0.12 diff --git a/README.md b/README.md index 7fcec4d..a98c84f 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ You can use this library to get tweets, profiles, and trends trivially. - [Upload media](#upload-media) - [Account](#account) - [Connection](#connection) + - [User-Agent](#user-agent) - [Proxy](#proxy) - [HTTP(s)](#https) - [SOCKS5](#socks5) @@ -670,6 +671,26 @@ accounts, err := scraper.GetAccountList() ## Connection +### User-Agent + +By default client uses user agent from mac google chrome v129. + +``` +Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 +``` + +You can set any client you want with method `SetUserAgent`. + +```golang +scraper.SetUserAgent("user-agent") +``` + +To get current user agent use `GetUserAgent`. + +```golang +agent := scraper.GetUserAgent() +``` + ### Proxy #### HTTP(s)