Skip to content
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

wik Random Article Feature #12

Closed
reyg3 opened this issue Feb 28, 2022 · 3 comments
Closed

wik Random Article Feature #12

reyg3 opened this issue Feb 28, 2022 · 3 comments

Comments

@reyg3
Copy link
Contributor

reyg3 commented Feb 28, 2022

Any interest in including a random wikipedia article feature in wik? I have a basic version of this working but can clean it up and make a PR if you're interested.

@yashsinghcodes
Copy link
Owner

yashsinghcodes commented Mar 1, 2022

Yea, go for it. I was actually thinking about adding this but haven't started writing the code. So It will be much appreciated.

@reyg3
Copy link
Contributor Author

reyg3 commented Mar 4, 2022

Just submitted PR. I was also thinking getInfo() could have the parameter variable term as optional (term="", lang="en") to allow for a single function to get both specific and random articles. I was thinking of this approach since my PR for getRand() uses your same bs4 logic as getInfo() to return article text. Let me know what you think and if you'd like I can add that random article retrieval to getInfo() in a PR.

@yashsinghcodes
Copy link
Owner

yashsinghcodes commented Mar 4, 2022

For now lets leave them both as a two different functions because I was actually thinking of rewriting the getInfo function as scraper and coding a new function for printing the texts.

Thank you so much for the contribution Rey it is really appreciated.

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

No branches or pull requests

2 participants