Created
October 5, 2016 13:56
-
-
Save Muratam/05421c79fc72f402b1b6856ef721f044 to your computer and use it in GitHub Desktop.
This file contains 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
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