diff --git a/utils/scrape/index.ts b/utils/scrape/index.ts index a9c50f4..b5d0baf 100644 --- a/utils/scrape/index.ts +++ b/utils/scrape/index.ts @@ -77,6 +77,10 @@ const fetchDataFromGithub = async ( return repositories; }; +function cleanAuthor(link: string) { + return link.replace(/[\(\)]/g, ''); +} + function convertToJSON(repositories: string[]): ScrapedRepository[] { return repositories.map((repository) => { const parser = new DOMParser(); @@ -92,8 +96,8 @@ function convertToJSON(repositories: string[]): ScrapedRepository[] { return { name, link, - author, - authorLink, + author: cleanAuthor(author), + authorLink: cleanAuthor(authorLink), }; }); }