When I run the first function it prints the correct URL. However, when I run the second section it shows an error saying that fullurl is not defined.
Can anyone help me with this?
Here is my code:
def urlmaker(format_mtg):
fullurl = url + format_mtg.get() + "-constructed-league-" + date.get() #adds the users options to the url
print(fullurl)
return fullurl
def htmltotxt(fullurl):
print(fullurl)
response = urllib.request.urlopen(fullurl) #requests the ability to open the website, which magic.wizards.com allows
html = response.read() #reads the html data from the open website
html = str(html) #saves the data as a string
make_lists(card_name_regex, card_number_regex, card_number_list, html)