A Go scraper executed by a gin server endpoint that scrapes and crawls through every article on https://darknetlive.com/post/. During this process, articles relating to fentanyl are automatically selected and saved to a Mongo database.
You are able to call the gin server endpoint to scrape the website and fetch the articles from the database. The gin server is hosted on Railway and can be accessed at https://fentanyl-epidemic-tracker.xilaluna.com/.
/scrape
- Scrapes the website and saves the articles to the database./articles
- Fetches the articles from the database./ping
- Pings the gin server to check if it is up.
- First the gin server is started and the database is connected.
- The
/scrape
endpoint is called and checks pagination to see if a new page has been added. - If a new page has been added, the articles are scraped and saved to the database if they contain the keyword "fentanyl".
- The
/articles
endpoint is called and the articles are fetched from the database. - The articles are displayed on the website.
- Store data in a Redis database.
- Update the asthetics of the static website.
- Create display to show each individual article.
- Create a way to search for specific articles.
- Speed up scraper.