Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit 02cffaf

Browse files
committed
add a failsafe if there no link on a page
1 parent 455b069 commit 02cffaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wekeypedia/wikipedia/page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def get_links(self, extra_params={}):
501501
while True:
502502
r = api.get(params)
503503

504-
if "link" in r["query"]["pages"][ self.page_id ]:
504+
if "links" in r["query"]["pages"][ self.page_id ]:
505505
l = r["query"]["pages"][ self.page_id ]["links"]
506506
links.extend(l)
507507

0 commit comments

Comments
 (0)