Created
December 10, 2017 14:23
-
-
Save KevCui/d77239eb310e22746612ef71a80068d3 to your computer and use it in GitHub Desktop.
Open 9GAG NSFW image link without login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Open 9GAG NSFW image link without login | |
# How to use: 9gag.py "<url>" | |
import webbrowser | |
import sys, re | |
m = re.search('\/\w{7}', sys.argv[1]) | |
link = "http://img-9gag-lol.9cache.com/photo" + m.group(0) + "_460s.jpg" | |
print(link) | |
webbrowser.open(link) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment