Skip to content

Instantly share code, notes, and snippets.

@EnkrateiaLucca
Created July 10, 2023 23:47
Show Gist options
  • Save EnkrateiaLucca/f37d7ed76f6c900efb3f27ca275666c9 to your computer and use it in GitHub Desktop.
Save EnkrateiaLucca/f37d7ed76f6c900efb3f27ca275666c9 to your computer and use it in GitHub Desktop.
extracts text from urls
import re
text = """https://www.notion.so/enkrateialog/44a8f633dda74aa0b26b89ad960015fa?v=9be485bc35f44c68a9399f880844a45d | (7) Reference Sources
https://chat.openai.com/?model=gpt-4-plugins | ChatGPT
... (remaining text) ..."""
urls = re.findall(r'(https?://\S+)', text)
print(urls)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment