I am looking for a way to find out whether an item with a certain label and description already exists on Wikidata. This task should be performed by the Pywikibot. I don't want my Bot to create a new item if it already exists. So far, my code looks like this:
...
def check_item_existence(self):
transcript_file = self.transcript_file
with open(transcript_file) as csvfile:
transcript_dict = csv.DictReader(csvfile, delimiter="\t")
for row in transcript_dict:
site = pywikibot.Site("en", "TillsWiki")
existing_item = pywikibot.ItemPage(site, row['Name'])
title = existing_item.title()