Skip to content

Instantly share code, notes, and snippets.

Last active Mar 11, 2019
What would you like to do?
Open all found urls in default browser
import re
import webbrowser
text = """
Text with urls goes here. Let's open Google at
urls = re.findall('https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+', text)
for url in urls:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment