Skip to content

Commit

Permalink
A bit more error handling and updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenmoulder committed Jun 21, 2021
1 parent 8548acd commit a31baf2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ private static async Task<Filtering> CreateFiltering(Options o)
await ErrorHelper.LogAndExit("To date must be after from date");
}

if(dateTo > DateTime.Today)
{
await ErrorHelper.LogAndExit("To date cannot be in the future");
}

if(dateFrom < new DateTime(2016, 05, 26))
{
await ErrorHelper.LogAndExit("Date from cannot be before 2016-05-26 because that's when Twitch announced clips");
}

filter.DateFrom = dateFrom;
filter.DateTo = dateTo;

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# TwitchClipper
TwitchClipper is a .NET 5.0 cross platform compatible application, made to download https://twitch.tv clips. Downloading is done via [youtube-dl](https://yt-dl.org/), which will automatically be downloaded and saved in the project's folder.

```
$ ./twitchclipper --username Asmongold --from 2021-05-01 --to 2021-06-01
Downloading clips made by Asmongold
Grabbing the broadcaster's ID.
Scraping Twitch for clips. A total of 5 requests must be sent!
Clips found: 416 - Page 5/5
Found a total of 416 clips and 0 already exists. Downloading 416 clips.
```

Head over to [the Wiki](https://github.com/mortenmoulder/TwitchClipper/wiki) to find some documentation on various topics.

## Features
Expand All @@ -9,6 +20,7 @@ Head over to [the Wiki](https://github.com/mortenmoulder/TwitchClipper/wiki) to
* Save ALL clips (no limit)
* Many clip downloaders out there, can only download about 1000 clips before being throttled by Twitch. TwitchClipper has bypassed that limitation!
* Skip download if a file with the same name exists
* [Filtering](https://github.com/mortenmoulder/TwitchClipper/wiki/Command-line-arguments) with date ranges

## Installation
Head over to the Wiki to find the installation steps (IT'S REALLY EASY): https://github.com/mortenmoulder/TwitchClipper/wiki/Installation
Expand Down

0 comments on commit a31baf2

Please sign in to comment.