CodeChef Solutions Downloader

Hello, fellow CPers!

tl;dr

A web crawler that allows you to download all your AC submissions on CodeChef.

About

I came across many CodeChef Solution Downloaders but none of them worked for me, so I came up with my Python3-based script.

This script will allow you to document all your AC submissions on CodeChef for situations like when we try to download our solutions and archive them (a very cumbersome task, due to which people rarely try it). It doesn’t ship with a list of features and is a minimalist software for people who might want to download their submissions on this site. It supports all languages that are currently supported on CodeChef and saves the codes with appropriate extensions and downloads the user’s last accepted submission for a problem. The saved files are sorted according to their contest codes.

GitHub: CCSolutionsDownloader on GitHub

Edit: The downloader has been modified to fetch public submissions of a given user too

How to use?

  1. Clone repository to your PC
  2. Install dependencies:
pip install lxml
pip install bs4
pip install requests
  1. Run python3 main.py in CMD/Terminal and follow on-screen instructions

Let me know about any feedback, feature requests and bugs you face! :slight_smile:

Proof of Concept:

Console Output

Credits:

mb1994’s project
sandy999’s project

Thanks!
Arnav

4 Likes

I want to know why would you wanna archive/document your submissions?

I have personally faced some situations where I wanted to have a repository of my submissions offline. Some people also upload their solutions on GitHub for archiving.
The code can also be tweaked to get submissions of other users, by adding a line. Not sure if it will get past the “Sparky” CAPTCHA by Chef