A simple Go application that scrapes event details from "www.soldoutticketbox.com" every hour and inserts unique events into an SQLite database. If a new unique event is inserted into the database, a notification is sent via a Telegram bot.
- Go: Ensure you have Go installed on your machine. If not, follow the official Go installation guide.
- SQLite: This application uses SQLite to store event details. Ensure SQLite is installed on your machine.
- Telegram Bot: You'll need a Telegram bot token to send notifications and the chat ID of the destination.
-
Clone the repository:
git clone https://github.com/deathalt/cyprus_events cd cyprus_events
-
Install required Go packages:
go get github.com/PuerkitoBio/goquery go get github.com/mattn/go-sqlite3
-
Set environment variables:
TG_BOT_TOKEN
: Your Telegram Bot Token.TG_CHAT_ID
: The Chat ID where notifications will be sent.SQLITE_PATH
: Path to *.db file
export TG_BOT_TOKEN='your-telegram-bot-token' export TG_CHAT_ID='your-chat-id' export SQLITE_PATH='/tmp/data.db'
Simply run the Go application:
go run main.go
The application will scrape event details every hour and notify you on Telegram for any new unique events.
- SQLite: An embedded database used to store and deduplicate event details.
- goquery: A package that enables HTTP requests and HTML parsing in a jQuery-like syntax.
- Telegram Bot API: Used to send notifications for newly added events.
We welcome any contributions! If you find any issues or would like to add enhancements, please open an issue or a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.