package
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Jul 16, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
gochan
Download images from 4chan
Features
- Download all the images from a 4chan forum.
- No dependincies, no extra modules required.
- You can import this package into your go project and use it
Building From the source (If you just want an image scrapper and nothing more)
- Ensure your go version is >= 1.16
- Clone the repository
git clone https://github.com/DaKidReturns/gochan
- Go into the folder gochan
$ cd gochan/example
where you will find the example code as main.go
- Run
go build -o gochan
- Now that you have compiled your source you can use it by
$ ./gochan [4chan-urlname]
Using the module for your project
-
Ensure your go version is >= 1.16
-
Run the command go get github.com/DaKidReturns/gochan
-
Use it in your project by the import statement
import "github.com/DaKidReturns/gochan"
or
import(
"github.com/DaKidReturns/gochan"
)
it will be imported as gochan
.
Future Plans
- Add a progress bar to show the currently downloading image
- Currently it saves the pictures to the Directory
(HOME)/Pictures/Gochan
and takes only one command line argument
- I plan to do something with concurrency in golang, like download multiple files at once. (after I learn concurrency in golang)
- Create better Documentation
- Add a Logging feature
- Add an option for saving to custom directories
Why did I do this?
- I wanted to learn golang
- I wanted to download all the images from a forum on 4chan the one that contains a lot of technical drawings
So I figured why not create a web scaper for it ;-)
Documentation
¶
DownloadImages(string,[]string,*http.Client)
GetFolderName(*string) string - This funtions scans the html to give the folder a meaningful name
GetImageLinks(*string) []string - The html is sarched for Image links
GetSource(*http.Client,string)
Prints out a short intro about the application
Intro()
Prints out the useage
Usage()
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.