fix edge case
This commit is contained in:
parent
f755fafe4d
commit
c275e3e095
|
@ -1 +1,2 @@
|
|||
__pycache__/
|
||||
file.json
|
||||
|
|
5
URLs.py
5
URLs.py
|
@ -9,8 +9,9 @@ class URL:
|
|||
self.GetConfig()
|
||||
def GetURL(self, urlRange=(1,10)):
|
||||
self.url = ""
|
||||
for i in range(0,random.randint(*urlRange)):
|
||||
self.url += chr(random.choice((random.randint(65,90), random.randint(97,122), random.randint(48,57)))) #first one is uppercase; 2nd is lowercase; 3rd: numbers
|
||||
while self.url in list(self.urls) or self.url == "":
|
||||
for i in range(0,random.randint(*urlRange)):
|
||||
self.url += chr(random.choice((random.randint(65,90), random.randint(97,122), random.randint(48,57)))) #first one is uppercase; 2nd is lowercase; 3rd: numbers
|
||||
def GetConfig(self):
|
||||
try:
|
||||
with open("file.json") as file:
|
||||
|
|
Loading…
Reference in New Issue