HackerRank Submission Downloader allows you to download submissions for a contest in HackerRank.
The tool organizes the submissions according to the problem name and their programming language and then by account name.
For example,
out/2020-03-01-06-01
├── a-walk-to-remember-1
│ ├── c
│ │ ├── Cygnus_UOK.c
│ │ ├── KingCoders_SEUSL.c
│ │ └── StackTrace_NSBM_.c
│ ├── cpp
│ │ ├── BlackHawks_USJ.cpp
│ │ ├── Code_Clan_RUSL.cpp
│ │ ├── Cyborgs_USJ.cpp
│ │ ├── FRIDAY_USJ.cpp
│ │ ├── JPAC_UOP.cpp
│ │ ├── Paradox_UOJ.cpp
│ │ └── XCODERS_UOP.cpp
│ ├── csharp
│ │ └── CodeMart_UOR.cs
This tool was written in Go
- Install Golang 1.14 or newer
- Clone the repo in your local machine
- Run
go build
to build binary for your platform
Run chmod +x ./build/build.sh && ./build/build.sh
Download binary for your platform from release page (or build yourself 🔨).
The usage of the tool is simple. You have to provide a config.yaml
in your current working directory and tool will pick this up. config.yaml
contains all the necessary info to download submissions from a hackerrank contest.
Note: You should be a moderator or an administrator of the contest in order to use this tool for download submissions
sample config file config.yaml
is shown below
# slug name of the contest
contest: our-contest
# browser cookies for HackerRank as semicolon seperated string
cookies: >-
abc=123; xyz=123;
# output directory
output: results
# limit 5 parallel download threads
parallelDownloads: 5
# wait time between downloads in seconds
waitTime: 1
# burst per wait time
rate: 10
Run ./hackerrank-dl
with config.yaml
in the working directory to start the magic.
- Go to HackerRank
- Go to your contest
- Slug name is in the pattern of
https://www.hackerrank.com/aces-coders-v8
- In here
aces-coders-v8
is the slug name - Copy it and use it in
config.yaml
HackerRank does not provide a public API, thus we have to use browser cookies for authentication
Following instructions are based on Chrome
- Open Chrome
- Login to HackerRank
- Make sure you are an admin/moderator of your contest
- Install EditThisCookie browser extension for chrome
- Open extension
- Click Settings Icon
- Set Choose preferred export format for cookies to Semicolon seperated name=value pairs
- Open up
https://hackerrank.com
- Open
EditThisCookie
extension - Click
Export
button (arrow out) - Paste the value for cookies in
config.yaml