ginjaninja 670 Posted Thursday at 12:21 PM Posted Thursday at 12:21 PM Would it be possible to update the discogs plugin to change into https://www.discogs.com/artist/2412751 I have a prototype working (with little testing) with this function if it helps. /// <summary>Converts Discogs Markdown links and artist references to visible text.</summary> internal static string FlattenMarkdownLinks(string profile) { if (string.IsNullOrEmpty(profile)) return profile; // Discogs profiles use [a=Artist Name] for artist references and Markdown for links. // Preserve visible text while removing only the link/reference markup. var result = Regex.Replace(profile, @"\[a=(?<label>[^\]]+)\]", match => match.Groups["label"].Value, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); result = Regex.Replace(result, @"\[(?<label>(?:[^\[\]]|\[[^\[\]]*\])*)\]\((?<url>(?:[^()]|\([^()]*\))*)\)", match => match.Groups["label"].Value, RegexOptions.CultureInvariant); return result; } creating my own plugin falls foul of discogs aggressive 429 rate limiting when the same endpoing is called in quick succession. thanks for consideration.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now