Created
April 24, 2018 01:15
-
-
Save daspecster/8562394acb431d72b388ef149f4d688d 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
def generate_path(self): | |
min_char = 8 | |
max_char = 12 | |
max_lookups = 100 | |
character_choices = string.ascii_letters | |
for _ in range(max_lookups): | |
url_path = ( | |
"".join(choice(character_choices) for x | |
in range(randint(min_char, max_char)))) | |
return url_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment