Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hemanta212/nepali-news-portal-kbd
Online webapp that scrapes news from different new portals of Nepal and worldwide. Hosted at heroku.
https://github.com/hemanta212/nepali-news-portal-kbd
api blueprint database email-validation flask heroku international kantipur kbd login logout nepal nepali news news-scraping pagination password-reset postgres scraping sqlite
Last synced: 26 days ago
JSON representation
Online webapp that scrapes news from different new portals of Nepal and worldwide. Hosted at heroku.
- Host: GitHub
- URL: https://github.com/hemanta212/nepali-news-portal-kbd
- Owner: hemanta212
- License: mit
- Created: 2019-03-01T16:07:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T14:42:41.000Z (over 1 year ago)
- Last Synced: 2023-03-04T02:14:05.294Z (over 1 year ago)
- Topics: api, blueprint, database, email-validation, flask, heroku, international, kantipur, kbd, login, logout, nepal, nepali, news, news-scraping, pagination, password-reset, postgres, scraping, sqlite
- Language: Python
- Homepage: https://kbd.herokuapp.com
- Size: 842 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Khabar-board
Khabar-board is an online webapp that scrapes news from diffrent new portals of Nepal and worldwide.Currently, the news is Scraped for National nepali,
International nepali, National english and International english sections from Kantipur, Nagarik, Ujyaalo and Kathmandu Post, himalayan times, nepal times and top headlines from International sources like bbc, cnn, new york times, etcFeatures:
* Login, Logout, Remember login through cookies
* Reset and confirm email address
* National and International news in both nepali and english
* News collection(scraping, api) and serving
* Pagination, Collapsible sidebar, Responsive navigation
* Use proper structure with flask blueprinting
* Hosted Live at heroku @ kbd.herokuapp.comTodos:
- [x] Integrate various international news apis(top, general, sports, tech...)
- [x] Rewrite manage.py and database management
- [x] Experiment with docker deploys
- [ ] Add logging
- [ ] Add tests
- [ ] Extract the scraper to separate news API
- [ ] Redesign the dashboard
- [ ] Remove compulsory login and establish per person db record of preferences
- [ ] Give user choice to customize news topic, sources, language etc
- [ ] News search on keyword for custom category (like bitcoin, trump, etc)
- [ ] Integrate social media login (facebook, github)## Run with Docker
```sh
docker build -t kbd .
docker run -it --rm --net=host kbd
```## Installation and Usage
- Install [python 3.6 or above](https://python.org/downloads)
- Clone/download this repository and navigate to this repo through cmd```sh
$ git clone https://github.com/hemanta212/nepali-news-portal-kbd
```- Install either [poetry](https://github.com/python-poetry/poetry) or follow [this guide](/docs/venv.md) for setting up virtual environment.
- Installing dependencies using poetry
```sh
$ poetry install
```
- Installing dependencies using pip.
```sh
$ python -m pip install -r requirements.txt
```### Setting up Database
You can setup any database supported [here](https://docs.sqlalchemy.org/en/13/core/engines.html#supported-databases). This doc covers setting up sqlite and postgres db.##### Setting up SQLite
Populate the following as your environment variables```
SECRET_KEY="
Gunicorn is a production WSGI server that is essential for running flask project in production environments like with Procfile in [Heroku](https://heroku.com).After installing, you just provide the application instance of project to gunicorn.
eg.
```
gunicorn run:app // prod envgunicorn run:app debug
```#### *NOTE*:
Gunicorn is not supported in windows operating system. However, you can run it using [WSL](https://google.com/search?query=windows%20subsystem%20for%20linux).## Accessing all news
After successfully running the app, go to localhost:5000/signup and sign up with an account with this admin provisioned email '[email protected]' (yes this exact email only) and login. You should see news from all the sources.