import wikipedia
import random
ee = None
try:
p = wikipedia.summary("Arla")
except wikipedia.DisambiguationError as e:
ee = e
s = random.choice(e.options)
p = wikipedia.page(s)
How to deal with this, I have a lot of keywords that I want to retrieve only articles that fall in a specific category (topic "food and beverages)
I just tried "Arla" keyword and it is refered as a disambiguation page see https://en.wikipedia.org/wiki/Arla
How to deal with this, I have a lot of keywords that I want to retrieve only articles that fall in a specific category (topic "food and beverages)
Many thanks !