NewsTok is a web-based application developed using Flask, offering users a TikTok-like scrolling interface for discovering and reading articles and news. The application employs web scraping to gather articles from the internet, storing them in a database. As users scroll through the app, they are presented with article titles and AI-generated shortened content. Clicking on an article reveals its full content.
- TikTok-like Interface: Engage with news and articles in a visually dynamic and user-friendly manner.
- Web Scraping: Automatically fetch articles from the internet to keep content fresh.
- AI Summarization: Utilize artificial intelligence to provide concise summaries of article content.
- Database Storage: Efficiently store and manage a collection of articles for seamless retrieval.
-
Clone the repository:
git clone https://github.com/ivanrj7j/NewsTok.git
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Access NewsTok in your web browser at http://localhost:5000.
- Scroll through the app to discover articles.
- Click on an article to view its full content.
- Stay informed with a unique and engaging news-reading experience.
|-- components.py (File)
|-- web
| |-- app.py (File)
| |-- back.py (File)
| |-- front.py (File)
| |-- __init__.py (File)
|-- core
| |-- __init__.py (File)
| |-- models
| | |-- article.py (File)
| |-- workers
| | |-- fetcher.py (File)
| | |-- businessinsider.py (File)
| | |-- scheduler.py (File)
| | |-- searcher.py (File)
| | |-- businessinsiderSearcher.py (File)
The source code is organized into two main parts:
-
web: Contains the web application code.
app.py
: Main application file.back.py
: Backend blueprint.front.py
: Frontend blueprint.__init__.py
: Initialization file.
-
core: Manages core functionalities, independent of the web application.
__init__.py
: Initialization file.- models:
article.py
: A model for an article, contains essential details and methods related to an article
- workers:
businessinsider.py
: Worker for fetching articles from Business Insider.fetcher.py
: Generic article fetching functionality. Used as a parent class for other targetted fetchersscheduler.py
: Schedules tasks for fetching articles.searcher.py
: Parent class for searching any website for articles.businessinsiderSearcher.py
: Specialized searcher for Business Insider.
NewsTok is licensed under the Apache License 2.0. See LICENSE for more details.
Contributions are welcome! Please follow our Contribution Guidelines when submitting pull requests.
For issues or suggestions, feel free to open an issue.