def get_wiki_title(wiki_url):
 try:
  content = requests.get(wiki_url).text
  return content.split('title')[1].split('-')[0].split('>')[1].strip()
 except:
  return os.path.basename(wiki_url).replace('_', ' ')

def get_wiki_title ( wiki_url ) : try : content = requests . get ( wiki_url ) . text return content . split ( 'title' ) [ 1 ] . split ( '-' ) [ 0 ] . split ( '>' ) [ 1 ] . strip ( ) except : return os . path . basename ( wiki_url ) . replace ( '_' , ' ' )
get the wikipedia page title for a given wikipedia url .