code: def get_wikidata_qnum(wikiarticle, wikisite):
      
      resp = requests.get('https://www.wikidata.org/w/api.php', timeout=5, params={
          'action': 'wbgetentities',
          'titles': wikiarticle,
          'sites': wikisite,
          'props': '',
          'format': 'json'
      }).json()
      return list(resp['entities'])[0]
docs: Retrieve the Query number for a wikidata database of metadata about a particular article
  
      >>> print(get_wikidata_qnum(wikiarticle="Andromeda Galaxy", wikisite="enwiki"))
      Q2469