Skip to content

Commit

Permalink
Merge pull request #758 from nikhil25803/main
Browse files Browse the repository at this point in the history
Fixed Hacker Earth and improved documentation
  • Loading branch information
nikhil25803 authored Aug 25, 2023
2 parents 296644b + c8a3c79 commit 0365843
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ per user.followers()

## The platforms we cover.

- [GitHub](https://github.com/Clueless-Community/scrape-up/blob/main/documentation.md#github)
- [GitHub](https://github.com/Clueless-Community/scrape-up/blob/main/documentation.md#github)
- [GitHub Education](https://github.com/Clueless-Community/scrape-up/blob/main/documentation.md#github-education)
- [Codechef](https://github.com/Clueless-Community/scrape-up/blob/main/documentation.md#codechef)
- [Hacker News](https://github.com/Clueless-Community/scrape-up/blob/main/documentation.md#hacker-news)
Expand Down Expand Up @@ -226,10 +226,10 @@ articles = hackernews.Articles()
from scrape_up import hackerearth
```

Create an object of class `Hackerearth`
Create an object of class `Challanges`

```python
hackerearth = hackerearth.Hackerearth()
hackerearth = hackerearth.Challanges()
```

| Methods | Details |
Expand All @@ -243,15 +243,15 @@ hackerearth = hackerearth.Hackerearth()
### HackerRank

```py
from scrape_up import hackerearth
from scrape_up import hackerrank
```

### Scrape user details

Create an object of class `User`.

```python
hackerank = User()
hackerank = hackerrank.User()
```

| Methods | Details |
Expand All @@ -264,7 +264,7 @@ hackerank = User()
Create an object of class `Contest`.

```python
hackerank = Contest()
hackerank = hackerrank.Contest()
```

| Methods | Details |
Expand Down
14 changes: 7 additions & 7 deletions src/scrape_up/Hackerearth/Hackerearth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import requests


class Hackerearth:
class Challenges:
"""
First, create an object of class `Hackerearth`
First, create an object of class `Challenges`
```python
hackerearth = Hackerearth()
hackerearth = Challenges()
```
| Methods | Details |
| ---------------- | ------------------------------------------------------ |
Expand All @@ -25,7 +25,7 @@ def get_ongoing(self):
Get the details of ongoing challenges on Hackerearth.\n
Example
```python
hacker = Hackerearth()
hacker = Challenges()
hacker.get_ongoing()
```
Returns:
Expand Down Expand Up @@ -72,7 +72,7 @@ def get_upcoming(self):
Get the details of ongoing challenges on Hackerearth.\n
Example
```python
hacker = Hackerearth()
hacker = Challenges()
hacker.get_upcoming()
```
Returns:
Expand Down Expand Up @@ -119,7 +119,7 @@ def get_hiring(self):
Fetches and returns information about ongoing job opportunities from HackerEarth's jobs page.\n
Example
```python
hacker = Hackerearth()
hacker = Challenges()
hacker.get_hiring()
```
Example output:
Expand Down Expand Up @@ -159,4 +159,4 @@ def get_hiring(self):
challenge.append(data)
return challenge
except:
return None
return None
4 changes: 2 additions & 2 deletions src/scrape_up/Hackerearth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .hackerearth import Hackerearth
from .hackerearth import Challenges

__all__ = ["Hackerearth"]
__all__ = ["Challenges"]

0 comments on commit 0365843

Please sign in to comment.