Skip to content

Instantly share code, notes, and snippets.

@Muratam
Created October 5, 2016 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Muratam/05421c79fc72f402b1b6856ef721f044 to your computer and use it in GitHub Desktop.
Save Muratam/05421c79fc72f402b1b6856ef721f044 to your computer and use it in GitHub Desktop.
import re,requests,random
def getById(id):
body = requests.get("https://nijie.info/view.php?id="+ str(id)).content.decode("utf-8")
found = re.findall(r'"(https://\S+?nijie_picture\S+?\.(?:jpg|png|jpeg))"',body)
if found : return re.sub(r'/small_light\(\S+\)',"",found[0])
else : return ""
def randomGet():
r = random.randint(1005,187600)
url = getById(r)
return "はい!えっちなのどうぞ❤ \n" + url
print(randomGet())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment