Python: The behavior of this method will change in future versions

Explanation:

FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if next_page_a:

if next_page_a:
if next_page_a is not None: or if len(next_page_a)> 0: That’s fine

Read More: