You are not logged in. Please login at www.codechef.com to post your questions!

×

A tool to download all your successful codechef solutions in one go

14
2

Hi all,

tl;dr: I have created a web crawler tool that can download all your AC solutions in one go. Just provide the username and it will download all the code for you.

To fit the use case when we often try to view or download other people's solutions to learn more, or when we try to download our own solutions and like to archive them (the latter especially being a very cumbersome task, due to which people rarely try it):

I have created a web crawler tool for CodeChef. It can download all AC solutions of a CodeChef user. Just provide the username and that's it. It will download everything for you. It has some decent features, and I'll be rolling out new features in the future hopefully.

Here is the github repository link: Mayank Bhura's github project. Please feel free to try it out, and any feedback is welcome. Usage instructions etc are given in the repository README.

It is just a jar file, so just download it and get started! :) Feedback link: here.

Thank you all :)

Mayank Bhura (@mb1994)

This question is marked "community wiki".

asked 26 Jan '17, 23:37

mb1994's gravatar image

4★mb1994
114
accept rate: 0%

2

Hey mb1994, We would like to get on a call with you and discuss the entire functionality or your project and the effect it might have on CodeChef. So, could you please send us your contact details at: feedbcak[at]codechef[dot]com

(27 Jan '17, 10:40) admin ♦♦0★

Codechef site changed, so this is not working any more. I have made changes to the crawler along with some feature additions :)

-> Makes separate directories for every contest, and saves the associated submissions in the corresponding directories.

-> Previously, crawler would only fetch the last AC solution, but this logic might fail in case of long contest. Now the crawler will fetch single best solution considering the score, time and memory (Fetches an AC submission with best score, minimum time and minimum memory usage).

Github Link:

link

answered 27 Jul '17, 22:06

flappy's gravatar image

4★flappy
5154
accept rate: 36%

edited 27 Jul '17, 22:10

I got this error:

Exception in thread "main" java.lang.NumberFormatException: For input string: "H idde" at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at sun.misc.FloatingDecimal.parseDouble(Unknown Source) at java.lang.Double.parseDouble(Unknown Source) at CodechefCrawler.getLanguageAndProblemId(CodechefCrawler.java:163) at CodechefCrawler.fetchSubmissionIDs(CodechefCrawler.java:180) at CodechefCrawler.crawl(CodechefCrawler.java:51) at Main.main(Main.java:23)

(28 Jul '17, 16:29) dhruvsomani3★
2

Well that is strange, I tested this for 7 users and I was successfully able to download the solutions contest wise (for each user). I guess I missed an edge case :P. I will look into the issue and get back to you on this.

(28 Jul '17, 17:22) flappy4★
2

There is nothing wrong with the crawler. For this contest ISCC2017, the time and memory is hidden (for all submissions) ,whereas the crawler expects these attributes to be a double datatype, thus it is throwing an error.

I guess its an external contest, so the organisers would have some reason to hide these attributes.

It passed for other users since they didn't participate in this contest. Moreover crawler don't expect such attributes in submission page.

I will definitely modify the crawler for such cases. I never expected the time and memory to be hidden!

Thank you for pointing this :)

(28 Jul '17, 17:43) flappy4★
1

Pushed the changes.

I was successfully able to download your solutions now :)

Make sure you again download the updated jar file.

(28 Jul '17, 18:44) flappy4★
1

Hey! Thanks. It works like a charm! It is AWESOME!

(28 Jul '17, 19:38) dhruvsomani3★

Amazing software @flappy

(07 Feb '18, 17:48) droy05284★
showing 5 of 6 show all

That sound so AWESOME!!!!!

I can see a good use of it in reference purposes, like a user thinks "This XYZ is good. Lets download all his soln as reference, so when I get stuck, I can look at them."

link

answered 26 Jan '17, 23:47

vijju123's gravatar image

5★vijju123 ♦♦
15.4k12066
accept rate: 18%

Thanks so much! Please share it among your friends if you want.

(27 Jan '17, 01:46) mb19944★

Wow yr! This tool is absolutely awesome! Good job... I expect more like these from you!

link

answered 27 Jan '17, 11:27

bansal1232's gravatar image

5★bansal1232
2.8k1419
accept rate: 16%

+1. Btw have you seen this: http://codeforces.com/blog/entry/18084 (spoj,cf and codechef) or this: https://github.com/ideamonk/spojbackup or this: https://github.com/codenirvana/spoj-solutions. There are quite a few pet projects like these, but I don't know if they are reliable.

Edit: This needs java 1.8+

link

answered 28 Jan '17, 15:53

noob333's gravatar image

5★noob333
10414
accept rate: 0%

edited 28 Jan '17, 16:38

The jar file is not opening please help!!!

link

answered 05 Sep '17, 17:14

srevarun2001's gravatar image

2★srevarun2001
0
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×152
×36

question asked: 26 Jan '17, 23:37

question was seen: 1,781 times

last updated: 07 Feb '18, 17:48