Skip to content

Fetch references #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adamwight
Copy link
Contributor

No description provided.

Adam Roses Wight added 3 commits August 10, 2017 00:08
This utility had been stubbed out with hard-coded parameters.
@@ -3,13 +3,14 @@

Usage:
fetch_references -h | --help
fetch_references <host> <rev-id>
fetch_references <host> <title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rev_id is more useful than text because we often want to get references historically.



def run(host, rev_id):
session = mwapi.Session("https://en.wikipedia.org")
doc = session.get(action='query', prop='revisions', titles='Anachronism',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha. Looks like that was hard-coded as a title anyway. We could use revids=rev_id here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants