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

Scrape categories and topics for news.py #204

Open
tianyizheng02 opened this issue Aug 25, 2024 · 3 comments
Open

Scrape categories and topics for news.py #204

tianyizheng02 opened this issue Aug 25, 2024 · 3 comments

Comments

@tianyizheng02
Copy link
Contributor

tianyizheng02 commented Aug 25, 2024

We should scrape [the categories and topics]. We have no idea what the maintenance of this repo will look like over time. It's certainly had its lulls over time, so let's make it withstand the lack of us

Originally posted by @RitwikGupta in #203 (comment)

In #203, I rewrote news.py to scrape Pitt news articles from the Pittwire website, but I hard-coded the list of news categories and topics. We should scrape these values instead so that we don't have to keep them updated ourselves. Ideally, news.py should only scrape these values once, when the users uses a function from the module for the first time, so that the values are available for all subsequent function calls.

@tianyizheng02
Copy link
Contributor Author

Opened an issue for this task in case anyone else wanted to work on it

@timparenti
Copy link
Member

Should this really be on import, or should it be on use?

@tianyizheng02
Copy link
Contributor Author

Both would technically work, but yeah it'll probably be better if they were imported on use, if for no reason than to make the code easier to test.

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