Skip to content

Commit ab58aad

Browse files
committed
Add Rate Your Music support, fix false positives, update user-agent
- Added support for Rate Your Music - Fixed three false positives (Medium, Threads, and Truth Social) - Updated the default user‑agent string from Firefox/135 to Firefox/141
1 parent 4f8250e commit ab58aad

4 files changed

Lines changed: 42022 additions & 40854 deletions

File tree

Emora/EmoraForm.Designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Emora/EmoraForm.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private class WebsiteInfo
9595
{"Lichess", new WebsiteInfo {ErrorType = "status_code", Url = "https://lichess.org/@/{}"}},
9696
{"LinkedIn", new WebsiteInfo {ErrorType = "status_code", Url = "https://www.linkedin.com/in/{}"}},
9797
{"Linktree", new WebsiteInfo {ErrorType = "message", ErrorMessage = "\"statusCode\":404", Url = "https://linktr.ee/{}"}},
98-
{"Medium", new WebsiteInfo {ErrorType = "message", ErrorMessage = "<span class=\"fw\">404</span>", Url = "https://{}.medium.com/about"}},
98+
{"Medium", new WebsiteInfo {ErrorType = "message", ErrorMessage = ">404</span>", Url = "https://{}.medium.com/about"}},
9999
{"Minecraft", new WebsiteInfo {ErrorType = "status_code", Url = "https://api.mojang.com/users/profiles/minecraft/{}"}},
100100
{"Mixcloud", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://www.mixcloud.com/{}/", Url = "https://api.mixcloud.com/{}/"}},
101101
{"ModDB", new WebsiteInfo {ErrorType = "status_code", Url = "https://www.moddb.com/members/{}"}},
@@ -115,6 +115,7 @@ private class WebsiteInfo
115115
{"Plurk", new WebsiteInfo {ErrorType = "message", ErrorMessage = "<title>User Not Found! - Plurk</title>", Url = "https://www.plurk.com/{}"}},
116116
{"Product Hunt", new WebsiteInfo {ErrorType = "status_code", Url = "https://www.producthunt.com/@{}"}},
117117
{"PyPi", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://pypi.org/user/{}", Url = "https://pypi.org/_includes/administer-user-include/{}"}},
118+
{"Rate Your Music", new WebsiteInfo {ErrorType = "status_code", Url = "https://rateyourmusic.com/~{}"}},
118119
{"Reddit", new WebsiteInfo {ErrorType = "message", ErrorMessage = "\"error\": 404}", SuccessMessage = "is_employee:", ProfileUrl = "https://www.reddit.com/user/{}/", Url = "https://www.reddit.com/user/{}/about.json"}},
119120
{"Replit", new WebsiteInfo {ErrorType = "status_code", Url = "https://replit.com/@{}"}},
120121
{"ReverbNation", new WebsiteInfo {ErrorType = "message", ErrorMessage = "<title>Page Not Found</title>", Url = "https://www.reverbnation.com/{}"}},
@@ -137,11 +138,11 @@ private class WebsiteInfo
137138
{"TryHackMe", new WebsiteInfo {ErrorType = "message", ErrorMessage = " doesn't exist\"}", ProfileUrl = "https://tryhackme.com/p/{}", Url = "https://tryhackme.com/api/v2/public-profile?username={}"}},
138139
{"TikTok", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://www.tiktok.com/@{}", Url = "https://www.tiktok.com/oembed?url=https://www.tiktok.com/@{}"}},
139140
{"Tinder", new WebsiteInfo {ErrorType = "message", ErrorMessage = "<title data-react-helmet=\"true\">Tinder | ", Url = "https://tinder.com/@{}"}},
140-
{"Threads", new WebsiteInfo {ErrorType = "message", ErrorMessage = "<title>Threads</title>", Url = "https://www.threads.net/@{}", Headers = new Dictionary<string, string> {{ "Sec-Fetch-Mode", "navigate" }}}},
141+
{"Threads", new WebsiteInfo {ErrorType = "message", ErrorMessage = "<title>Threads", Url = "https://www.threads.net/@{}", Headers = new Dictionary<string, string> {{ "Sec-Fetch-Mode", "navigate" }}}},
141142
{"Topcoder", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://profiles.topcoder.com/{}/", Url = "https://api.topcoder.com/v5/members/{}"}},
142143
{"TradingView", new WebsiteInfo {ErrorType = "status_code", Url = "https://www.tradingview.com/u/{}/"}},
143144
{"Trello", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://trello.com/u/{}/activity", Url = "https://trello.com/1/Members/{}"}},
144-
{"Truth Social", new WebsiteInfo {ErrorType = "message", ErrorMessage = "\"error\":\"Record not found\"", ProfileUrl = "https://truthsocial.com/@{}", Url = "https://truthsocial.com/api/v1/accounts/lookup?acct={}"}},
145+
{"Truth Social", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://truthsocial.com/@{}", Url = "https://truthsocial.com/api/v1/accounts/lookup?acct={}"}},
145146
{"Tumblr", new WebsiteInfo {ErrorType = "status_code", Url = "https://www.tumblr.com/{}"}},
146147
{"Twitch", new WebsiteInfo {ErrorType = "status_code", ProfileUrl = "https://www.twitch.tv/{}", Url = "https://twitchtracker.com/{}"}},
147148
{"Untappd", new WebsiteInfo {ErrorType = "status_code", Url = "https://untappd.com/user/{}"}},
@@ -250,7 +251,7 @@ private HttpClient CreateConfiguredHttpClient()
250251
{
251252
Timeout = TimeSpan.FromSeconds(8)
252253
};
253-
client.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0");
254+
client.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0");
254255
return client;
255256
}
256257

0 commit comments

Comments
 (0)