Skip to content

Commit

Permalink
Update file path in api script
Browse files Browse the repository at this point in the history
  • Loading branch information
pyamin1878 committed Feb 10, 2024
1 parent cecf203 commit 925126f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions get_wiki_articles.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ def save_corpus(file_path, corpus):
wiki = wikipediaapi.Wikipedia(user_agent)

# Corpus file path
corpus_file_path = '../capstone/wiki_corpus.json'
corpus_file_path = 'your_file_path.json'

# Load existing corpus
wiki_corpus = load_corpus(corpus_file_path)

# Define sections to ignore
to_ignore = {'References', 'External links', 'See also', 'Notes'}

# Get Articles from Category, pulling feature articles for this example
# Get Articles from: Pulling Featured articles for this example
cat = wiki.page("Category:Featured articles")
articles = [w for w in cat.categorymembers.values() if w.ns == wikipediaapi.Namespace.MAIN]

Expand Down

0 comments on commit 925126f

Please sign in to comment.