Skip to content

Instantly share code, notes, and snippets.

@KevCui
Created December 10, 2017 14:23
Show Gist options
  • Save KevCui/d77239eb310e22746612ef71a80068d3 to your computer and use it in GitHub Desktop.
Save KevCui/d77239eb310e22746612ef71a80068d3 to your computer and use it in GitHub Desktop.
Open 9GAG NSFW image link without login
#!/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