import json import requests import time import string import random def get_random_wikipages(count): print('requesting wiki pages') HEADERS={'User-Agent': 'Random wikipage fetcher v1 - puts random wiki pages into reddit comments'} links = [] url = 'https://powerlisting.wikia.com/wiki/Special:Random' for x in range(count): page = requests.get(url, '%x' % random.getrandbits(16), headers=HEADERS) page.raise_for_status() title = page.text.split('