diff --git a/github-list-repos b/github-list-repos index 484b513..6bf01c2 100755 --- a/github-list-repos +++ b/github-list-repos @@ -60,7 +60,8 @@ for user in users: if not mfullname: print('Error: could not find name h1', file = sys.stderr) sys.exit(1) - print(f'{shlex.quote(html.unescape(musername.group(1).strip()))} {shlex.quote(html.unescape(mfullname.group(1).strip()))}') + print(html.unescape(musername.group(1).strip().replace('\n', ' ').replace('\r', ' '))) + print(html.unescape(mfullname.group(1).strip().replace('\n', ' ').replace('\r', ' '))) r = get(f'https://github.com/orgs/{user}/repositories') page = 1 while True: @@ -82,7 +83,8 @@ for user in users: fullname = html.unescape(m.group(1).strip()) else: fullname = '' - print(f'{shlex.quote(html.unescape(musername.group(1).strip()))} {shlex.quote(fullname)}') + print(html.unescape(musername.group(1).strip()).replace('\n', ' ').replace('\r', ' ')) + print(fullname.replace('\n', ' ').replace('\r', ' ')) r = get(f'https://github.com/{user}?tab=repositories') while True: for m in re.finditer(r'"]+)" itemprop="name codeRepository"(\s[^>]*)?>', r.text):