Skip to content

Instantly share code, notes, and snippets.

@daspecster
Created April 24, 2018 01:15
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 daspecster/8562394acb431d72b388ef149f4d688d to your computer and use it in GitHub Desktop.
Save daspecster/8562394acb431d72b388ef149f4d688d to your computer and use it in GitHub Desktop.
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