hello there i created a function with Python to get some data as you see in code
def do_func (path, events_count = 0):
  # Openning the connection and grap the page
  u_client = uReq(url)
  page_html = u_client.read()
  u_client.close()
  # html parser
  page_soup = soup(page_html, "html.parser")
  data = {}
  data['name'] = page_soup.find("name").text
  
  events = page_soup.find_all("events")
  events_count += len(events)
  data["events"] = events_count
  next_page = page_soup.find("nex_page")
  if (next_page):
    do_func(next_page, events_count)
  else:
    print(data)
    return data
print(do_func(url))
but after executing the function getting None
and if i use print(data) inside the function, i'm getting the object
 
    