|
|
@@ -0,0 +1,95 @@
|
|
|
+import requests
|
|
|
+import json
|
|
|
+import time
|
|
|
+import datetime
|
|
|
+
|
|
|
+# ----------------------------------------------------------------- #
|
|
|
+
|
|
|
+keyword = "aaaa"
|
|
|
+exactMatch = False
|
|
|
+
|
|
|
+groupCount = 100 # 10, 25, 50, 100
|
|
|
+howManyCycles = 100
|
|
|
+delayTime = 5
|
|
|
+
|
|
|
+groupMaxMembers = 30
|
|
|
+groupHasFunds = False
|
|
|
+publicGroup = True
|
|
|
+
|
|
|
+saveInFile = True
|
|
|
+
|
|
|
+# ----------------------------------------------------------------- #
|
|
|
+
|
|
|
+url = "https://groups.rprxy.xyz/v1/groups/search?keyword=" + keyword + "&prioritizeExactMatch=" + str(
|
|
|
+ exactMatch).lower() + "&limit=" + str(groupCount)
|
|
|
+# fundsUrl = "https://economy.roblox.com/v1/groups/GROUP/currency"
|
|
|
+
|
|
|
+foundGroups = []
|
|
|
+groupIdList = []
|
|
|
+nextPageCursor = ""
|
|
|
+
|
|
|
+for cycle in range(0, howManyCycles):
|
|
|
+ print("Cycle number: " + str(cycle))
|
|
|
+ print("Percentage: " + str(int((cycle / howManyCycles) * 1000) / 10) + "%")
|
|
|
+ requestData = requests.get(url + "&cursor=")
|
|
|
+ # print(requestData.json())
|
|
|
+ dataTable = json.loads(requestData.content)
|
|
|
+
|
|
|
+ if nextPageCursor == "end":
|
|
|
+ break
|
|
|
+
|
|
|
+ try:
|
|
|
+ nextPageCursor = dataTable["nextPageCursor"]
|
|
|
+ except:
|
|
|
+ nextPageCursor = "end"
|
|
|
+
|
|
|
+ for group in dataTable["data"]:
|
|
|
+ valid = True
|
|
|
+ if group["memberCount"] > groupMaxMembers:
|
|
|
+ valid = False
|
|
|
+ if publicGroup and not group["publicEntryAllowed"]:
|
|
|
+ valid = False
|
|
|
+ if groupHasFunds:
|
|
|
+ fundsUrl = "https://economy.rprxy.xyz/v1/groups/" + str(group["id"]) + "/currency"
|
|
|
+ economyData = requests.get(fundsUrl)
|
|
|
+ economyJSON = json.loads(economyData.content)
|
|
|
+ try:
|
|
|
+ if economyJSON["robux"] == 0:
|
|
|
+ valid = False
|
|
|
+ except:
|
|
|
+ valid = False
|
|
|
+
|
|
|
+ if valid:
|
|
|
+ print("Found valid group " + str(group["id"]))
|
|
|
+ # group["description"] = ""
|
|
|
+ # group["name"] = ""
|
|
|
+ foundGroups.append(group)
|
|
|
+ groupIdList.append(group["id"])
|
|
|
+ # else:
|
|
|
+ # print("Invalid group")
|
|
|
+
|
|
|
+ time.sleep(delayTime)
|
|
|
+
|
|
|
+if foundGroups.__len__() > 0 and saveInFile:
|
|
|
+ thisTime = datetime.datetime.today()
|
|
|
+ fileTime = str(thisTime.year) + "-" + str(thisTime.month) + "-" + str(thisTime.day) + "_" + str(
|
|
|
+ thisTime.hour) + "-" + str(thisTime.minute) + "-" + str(thisTime.second)
|
|
|
+
|
|
|
+ with open("./run/foundGroups_" + fileTime + ".txt", "w", encoding='utf-8') as groupFile:
|
|
|
+ for line in foundGroups:
|
|
|
+ groupFile.write(line.__str__())
|
|
|
+ groupFile.write("\n")
|
|
|
+ # groupFile.close()
|
|
|
+
|
|
|
+ with open("./run/foundGroupIds" + fileTime + ".txt", "w", encoding='utf-8') as groupIdFile:
|
|
|
+ for line in groupIdList:
|
|
|
+ groupIdFile.write(str(line))
|
|
|
+ print(str(line))
|
|
|
+ groupIdFile.write("\n")
|
|
|
+ # groupIdFile.close()
|
|
|
+
|
|
|
+print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSEARCH COMPLETE")
|
|
|
+print("Found groups: " + str(foundGroups.__len__()))
|
|
|
+print(foundGroups)
|
|
|
+print("\nFound group ids:")
|
|
|
+print(groupIdList)
|