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.
Usage
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/.
API Endpoints:
/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.
How it Works
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.