Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for codechef Problem URL #43

Open
Rishabh-malhotraa opened this issue Oct 5, 2021 · 8 comments
Open

Add support for codechef Problem URL #43

Rishabh-malhotraa opened this issue Oct 5, 2021 · 8 comments
Assignees

Comments

@Rishabh-malhotraa
Copy link
Owner

Requirement

Currently, Caucus only supports codeforces and atcoder links, but it would be great to add support for CodeChef links.

  • Changes need to be made in the caucus server to add the functionality to scrape the CodeChef question from the get response.
    Also, some UI changes in the front-end, to tell the user that we support CodeChef links.

image

Files to be modified

@ujju20
Copy link

ujju20 commented Oct 5, 2021

Can I work on this issue?

@Rishabh-malhotraa
Copy link
Owner Author

Can I work on this issue?

Go ahead, if you need any help hmu on discord.

@ujju20
Copy link

ujju20 commented Oct 5, 2021

Can I work on this issue?

Go ahead, if you need any help hmu on discord.

Sure

@starkkumarkk1611
Copy link

Hi,
@Rishabh-malhotraa
CodeChef API is restricted. It means I have to do it with Pure Web scraping. I would Like to do it with npm package jsdom.

@Rishabh-malhotraa
Copy link
Owner Author

Hi, @Rishabh-malhotraa CodeChef API is restricted. It means I have to do it with Pure Web scraping. I would Like to do it with npm package jsdom.

Yes, @starkkumarkk1611 CodeChef does not have a public API that gives us access to question, we need to make a get request to the problem page, parse the HTML and select only those div which encloses the questions.

You can look at how its implemented here in caucus-server.

We use cheerio.js for parsing and traversing the dom elements

@starkkumarkk1611
Copy link

Thanks I will give my to implement this feature

@Rishabh-malhotraa
Copy link
Owner Author

@starkkumarkk1611 If you haven't started coding this, maybe take a similar issue #52, which adds the feature to load cses problems instead of this one as @ujju20 is also working on this.

@starkkumarkk1611
Copy link

@starkkumarkk1611 If you haven't started coding this, maybe take a similar issue #52, which adds the feature to load cses problems instead of this one as @ujju20 is also working on this.

thanks I will work on issue #52,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants