Last active
August 11, 2020 20:11
-
-
Save StephenBrown2/856cd35fc74fd454ad1b679ef6eaea2b to your computer and use it in GitHub Desktop.
Random placeholder generator - python 3.6+
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 random | |
placeholders = [ | |
{'scheme': 'http', 'domain': 'placebeard.it', 'sep': '/'}, | |
{'scheme': 'http', 'domain': 'placeskull.com', 'sep': '/'}, | |
{'scheme': 'https', 'domain': 'dummyimage.com', 'sep': 'x'}, | |
{'scheme': 'https', 'domain': 'placebear.com', 'sep': '/'}, | |
{'scheme': 'https', 'domain': 'placekitten.com', 'sep': '/'} | |
] | |
for i in range(0, 10): | |
x = random.choice(range(100, 1001)) | |
y = random.choice(range(100, 1001)) | |
h = random.choice(placeholders) | |
print(f"{h['scheme']}://{h['domain']}/{x}{h['sep']}{y}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment