问题 I am trying to find the wiki id of list of pages from wikipedia. So, the format is: input: list of wikipedia page titles output: list of wikipedia page ids. So far, I've gone through Mediawiki API to understand how to proceed, but couldn't find a correct way to implement the function. Can anyone suggest how to get the list of page ids? 回答1: Query basic page information: import requests page_titles = ['A', 'B', 'C', 'D'] url = ( 'https://en.wikipedia.org/w/api.php' '?action=query' '&prop=info'