0
첫 번째 함수를 실행하면 올바른 URL이 인쇄됩니다. 그러나 두 번째 섹션을 실행하면 fullurl이 정의되지 않았다는 오류가 표시됩니다.변수 값을 반환하는 데 파이썬 문제가 발생했습니다.
아무도 도와 줄 수 있습니까? 여기
내 코드입니다 :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)
공백을 사용하십시오. 파이썬은 문자마다 요금을 부과하지 않습니다. –
또한 실제 오류 및 추적을 표시하십시오. 게시 한 코드의 아무 것도 그 오류를 줄 수는 없습니다. –
이러한 함수를 호출하는 방법을 표시하지 않았습니다. 그것도 포함시켜주십시오. 또한 들여 쓰기를 확인하십시오. – roganjosh