Doc acaccb8cdd refactor: Improve 4chan downloader with better error handling and resource management
- Replace log.Fatal() with proper error returns for better control flow
- Add type safety with dedicated structs instead of interface{} maps
- Implement proper HTTP client with timeout configuration
- Fix goroutine closure variable capture issues
- Add input validation for URL format and board extraction
- Ensure destination directory exists before writing files
- Improve error messages with context and proper error wrapping
- Add resource cleanup with defer statements for HTTP responses
- Separate concerns into dedicated functions for better organization
- Use filepath.Join for cross-platform path handling
- Add comprehensive logging throughout the application

This refactoring makes the downloader more robust, maintainable, and production-ready while preserving all original functionality.
2025-10-03 19:33:16 +02:00
2024-03-12 12:31:55 +01:00
2024-03-19 13:08:31 +01:00
2024-03-12 08:56:20 +01:00
2024-03-20 10:14:46 +01:00

scrapychan

Description

scrapychan is a go rewrite of a original scraperchan that i wrote in Python. There was no reason to rewrite the original program but atleast it is faster and i learned some go.

Install

Build from source

Dependencies

You just need to have go installed

Build

git clone https://git.protron.dev/Doc/scrapychan
cd scrapychan
go build
go install

Prebuild binaries

or use the binaries provided in the release section

How to use

scrapychan -u=<Thread URL> -o=<Destinationpath of media> -v=<true or false to enable verbose logging>
Description
A simple program to scrape 4Chan Threads for Images and Videos rewritten in go
Readme 43 KiB
2024-03-20 10:24:21 +01:00
Languages
Go 90.4%
Shell 9.6%