楼主:
popjuice (pop juice)
2013-12-28 15:47:04小弟想问个很基本的问题
当执行这段code的时候(找网页连结的)
def get_next_target(page):
start_link = page.find('<a href=')
start_quote = page.find('"', start_link)
end_quote = page.find('"', start_quote + 1)
url = page[start_quote + 1:end_quote]
return url, end_quote
get_next_target('The site is called Google <a href= "www.google.com">')
print url
为什么系统会说 name 'url' is not defined
谢谢!