Skip to content

Commit

Permalink
Adding Twitch Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewperezledo committed Jun 22, 2024
1 parent d2e0513 commit c30f475
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/modules/twitch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ from scrape_up import twitch

### Scrape

First, create an object of class `Twitch_Scraper`
First, create an object of class `TwitchScraper`

```python
twitch_scraper = Twitch_Scraper()
twitch_scraper = TwitchScraper()
```

| Methods | Details |
Expand All @@ -19,7 +19,7 @@ twitch_scraper = Twitch_Scraper()

Example: using KaiCenat's twitch channel
```python
scraper = Twitch_Scraper()
scraper = TwitchScraper()
title = scraper.scrape_title_description("kaicenat")
print(title)
```
Expand Down
18 changes: 18 additions & 0 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -733,3 +733,21 @@ boxoffice = imdb.BoxOffice()
| Methods | Details |
| --------------- | ------------------------------------------------------------------------------- |
| `.top_movies()` | Returns the top box office movies, weekend and total gross, and weeks released. |

### Twitch

```py
from scrape_up import twitch
```

Create an instance of `TwitchScraper` class

```python
twitch_scraper = TwitchScraper()
```

| Method | Details |
| --------------------------- | -------------------------------------------------------------------- |
| `scrape_title_description(channel)` | Returns: Stream Title (if Live) or Channel Description (if Offline). |

---
6 changes: 3 additions & 3 deletions src/scrape_up/twitch/twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
Steps for use:
1. Create "Twitch_Scraper()" class instance
1. Create "TwitchScraper()" class instance
2. call the instance's function "scrape_title_description()" providing the channel name as a string
3. Channel stream title is returned (if live), Channel Description is returned (if offline)
Example: using KaiCenat's twitch channel
scraper = Twitch_Scraper()
scraper = TwitchScraper()
title = scraper.scrape_title_description("kaicenat")
print(title)
'''
class Twitch_Scraper():
class TwitchScraper():

def __init__(self):
self.status = None
Expand Down

0 comments on commit c30f475

Please sign in to comment.