Skip to content

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ˜‚ GoScraper: The "I-can't-believe-it's-not-human" Web Scraper ๐Ÿš€

What is this?

Meet GoScraper โ€“ the ultimate bot with no chill! ๐Ÿค– This tool not only scrapes a website's soul (a.k.a., its main content) but also uses Google's Gemini API to translate that garbled HTML mess into human-friendly lingo! If you're tired of squinting at tags and nested divs, GoScraper's got your back. Itโ€™s like magic, but with more Go code. โœจ


๐Ÿ’ก Why You Need This

Because sometimes you need the internet to justโ€ฆ make sense! ๐Ÿง

  • Step 1: Point GoScraper at a website.
  • Step 2: It scrapes.
  • Step 3: The content is magically transformed into something you can read without a PhD in HTML hieroglyphics.

๐Ÿ”ง Installation

  1. Clone the repo like itโ€™s hot:

    git clone https://github.com/anima-regem/GoScraper.git
    cd GoScraper
  2. Install dependencies:

    go get -u github.com/google/generative-ai-go/genai
    go get -u github.com/gocolly/colly
    go get -u github.com/joho/godotenv

โš™๏ธ Setting Up Your .env File

You'll need your secret API key to use the magic of AI ๐Ÿค–๐Ÿ”ฎ. Donโ€™t worry; itโ€™s just one tiny step!

  1. Make a file called .env in your project directory:

    touch .env
  2. Inside .env, add your Gemini API key:

    GEMINI_API_KEY=YOUR_SECRET_KEY
    

    ๐Ÿ’ก Pro Tip: Donโ€™t commit your .env file to Git, unless you like exposing secrets and living dangerously!


๐Ÿ— Usage Examples

Fire up GoScraper like this:

go run main.go <URL>
  • Example: Scrape and beautify "https://example.com" ๐ŸŒ

    go run main.go https://example.com
  • The Result: Voilร ! Human-readable content, courtesy of GoScraper and Gemini! ๐ŸŒŒ

Want a Binary? ๐Ÿ› 

Too lazy to run Go every time? We got you. Just download the latest release and run it like a boss:

./goscraper <URL>

๐Ÿ˜ฑ What Could Go Wrong?

  1. URL not starting with https:// โ€“ donโ€™t worry; GoScraper will add it for you because itโ€™s thoughtful like that. ๐Ÿ’…
  2. Error loading .env file โ€“ make sure your .env file is sitting right in the project folder, like a good dog. ๐Ÿถ
  3. API Key Issues โ€“ if GoScraper screams, make sure you havenโ€™t pasted your WiFi password by accident. ๐Ÿ˜‰

๐ŸŽ‰ Why We Love GoScraper

  • It's fun, fast, and mostly accurate! ๐Ÿ˜…
  • Leaves your screen spotless (no HTML mess).
  • Turns robot gibberish into readable content like a dream! ๐Ÿ’ค

Happy Scraping! Go forth and make the internet readable! ๐ŸŒŽ

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages