https://github.com/dohnj0e/snagtag
Scrape social media platforms such as Youtube and Tiktok, powered by Go.
https://github.com/dohnj0e/snagtag
automation cli command-line go golang selenium selenium-webdriver testing web-scraping youtube
Last synced: 4 months ago
JSON representation
Scrape social media platforms such as Youtube and Tiktok, powered by Go.
- Host: GitHub
- URL: https://github.com/dohnj0e/snagtag
- Owner: dohnj0e
- License: gpl-3.0
- Created: 2023-10-20T10:00:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-07T10:43:05.000Z (over 2 years ago)
- Last Synced: 2025-08-23T00:06:37.338Z (10 months ago)
- Topics: automation, cli, command-line, go, golang, selenium, selenium-webdriver, testing, web-scraping, youtube
- Language: Go
- Homepage:
- Size: 117 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SnagTag
Scrape social media platforms such as Youtube and Tiktok, powered by Go
[](https://www.buymeacoffee.com/dohnj0)
[](https://www.gnu.org/licenses/gpl-3.0.en.html) [](https://www.ubuntu.com/) [](https://github.com/dohnj0e/snagtag/releases/tag/v1.2.0-stable)
## Table of Contents
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Support](#support)
- [Author](#author)
## Features
- **Scraping:** Scrape video titles based on a provided keyword
- **Scrolling:** Scrape even more data with infinite scrolling
- **Readability:** Removed emojis and added custom colors
- **Command-Line:** Easy-to-use command-line interface
- **Testing:** Test scraping for Tiktok and Youtube
- **Errors/Logging:** Error handling and logging system
- **Authentication:** Login automatically to accounts
- **Captcha:** Waits user to interact with captcha
- **Config:** Configuration file to setup all you need
## Prerequisites
- Go 1.18 or later
- Selenium WebDriver
- Firefox or Chrome Browser
- Geckodriver (for Firefox) or Chromedriver (for Chrome)
## Installation
1. Clone the repository
- `git clone https://github.com/dohnj0e/snagtag.git`
- `cd snagtag`
2. Install Selenium WebDriver and browser driver
a. Download Selenium Server Standalone:
- [Selenium Server Standalone](https://www.selenium.dev/downloads/)
b. Move the downloaded Selenium jar file to a directory:
- `mv selenium-server-standalone-x.xx.x.jar /path/to/project/bin`
c. Download the WebDriver for your browser:
- [Geckodriver (for Firefox)](https://github.com/mozilla/geckodriver/releases)
- [Chrome Driver (for Chrome)](https://sites.google.com/a/chromium.org/chromedriver/) **Recommended**
d. Move the downloaded driver(s) to a directory:
- `mv geckodriver /usr/local/bin`
- `mv chromedriver /usr/local/bin`
3. Install all dependencies
- `go mod tidy`
5. Build the project
- `go build -o snagtag`
## Usage
- `./snagtag platform youtube --keyword education`
- `./snagtag platform tiktok --keyword education`
## ENV Variables (for TikTok)
- `export TIKTOK_USERNAME='your_tiktok_username'`
- `export TIKTOK_PASSWORD='your_tiktok_password'`
## Support
If you have any questions or need further assistance, feel free to reach out to me via email:
[💌 Contact Me](mailto:dohnj0@proton.me)
## Author
- Dohn Joe (@dohnj0e)