Skip to content

Commit a31baf2

Browse files
committed
A bit more error handling and updated README
1 parent 8548acd commit a31baf2

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Program.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ private static async Task<Filtering> CreateFiltering(Options o)
9090
await ErrorHelper.LogAndExit("To date must be after from date");
9191
}
9292

93+
if(dateTo > DateTime.Today)
94+
{
95+
await ErrorHelper.LogAndExit("To date cannot be in the future");
96+
}
97+
98+
if(dateFrom < new DateTime(2016, 05, 26))
99+
{
100+
await ErrorHelper.LogAndExit("Date from cannot be before 2016-05-26 because that's when Twitch announced clips");
101+
}
102+
93103
filter.DateFrom = dateFrom;
94104
filter.DateTo = dateTo;
95105

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# TwitchClipper
22
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.
33

4+
```
5+
$ ./twitchclipper --username Asmongold --from 2021-05-01 --to 2021-06-01
6+
7+
Downloading clips made by Asmongold
8+
Grabbing the broadcaster's ID.
9+
Scraping Twitch for clips. A total of 5 requests must be sent!
10+
11+
Clips found: 416 - Page 5/5
12+
Found a total of 416 clips and 0 already exists. Downloading 416 clips.
13+
```
14+
415
Head over to [the Wiki](https://github.com/mortenmoulder/TwitchClipper/wiki) to find some documentation on various topics.
516

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

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

0 commit comments

Comments
 (0)