From a25c44d8ccf4ce40ca742619f86ec6c182e75e13 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sat, 8 Apr 2023 10:10:08 -0700 Subject: [PATCH] Features/api/youtube source (#25) * corrected the youtube url getting added wrong * updated seed --- .../Controllers/SourcesController.cs | 2 +- seed.ps1 | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Newsbot.Collector.Api/Controllers/SourcesController.cs b/Newsbot.Collector.Api/Controllers/SourcesController.cs index ad09835..7c98819 100644 --- a/Newsbot.Collector.Api/Controllers/SourcesController.cs +++ b/Newsbot.Collector.Api/Controllers/SourcesController.cs @@ -119,7 +119,7 @@ public class SourcesController : ControllerBase Type = SourceTypes.YouTube, Name = htmlClient.Data.Header.Title, Source = "feed", - Url = "feed", + Url = url, Enabled = true, Tags = $"{SourceTypes.YouTube},{htmlClient.Data.Header.Title}", YoutubeId = htmlClient.Data.Header.YoutubeChannelID ?? "" diff --git a/seed.ps1 b/seed.ps1 index 2f67e2a..e4552c8 100644 --- a/seed.ps1 +++ b/seed.ps1 @@ -84,21 +84,34 @@ $redditSteamDeck = New-RedditSource -Name "steamdeck" $rssSteamDeck = New-RssSource -Name "Steampowered - Steam Deck" -Url "https://store.steampowered.com/feeds/news/app/1675200/?cc=US&l=english&snr=1_2108_9__2107" $rssFaysHaremporium = New-RssSource -Name "Fay's Haremporium" -Url "https://blog.nyxstudios.moe/rss/" $rssPodcastLetsMosley = New-RssSource -Name "Let's Mosley" -Url "https://anchor.fm/s/6c7aa4c4/podcast/rss" +$rssOmgLinux = New-RssSource -Name "Omg! Linux" -Url "https://www.omglinux.com/feed" +$rssEngadget = New-RssSource -Name "Engadget" -Url "https://www.engadget.com/rss.xml" +$rssArsTechnica = New-RssSource -Name "Ars Technica" -Url "https://feeds.arstechnica.com/arstechnica/index" $youtubeGameGrumps = New-YoutubeSource -Url "https://www.youtube.com/user/GameGrumps" $youtubeCityPlannerPlays = New-YoutubeSource -Url "https://www.youtube.com/c/cityplannerplays" $youtubeLinusTechTips = New-YoutubeSource -Url "https://www.youtube.com/@LinusTechTips" +$youtubeFireship = New-YoutubeSource -Url "https://www.youtube.com/@Fireship" +$youtubeClimateTown = New-YoutubeSource -Url "https://www.youtube.com/c/ClimateTown" + $twitchNintendo = New-TwitchSource -Name "Nintendo" -$miharuMonitor = New-DiscordWebhook -Server "Miharu Monitor" -Channel "dev" -Url $secrets.MiharuMonitor.dev01 +$miharuMonitor = New-DiscordWebhook -Server "Miharu Monitor" -Channel "dev" -Url $secrets.MiharuMonitor.dev02 +$sky = New-DiscordWebhook -Server "Let's Mosley" -Channel "bot test" -url $secrets.LetsMosley.test New-Subscription -SourceId $redditDadJokes.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $redditSteamDeck.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $rssSteamDeck.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $rssFaysHaremporium.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $rssPodcastLetsMosley.id -DiscordWebhookId $miharuMonitor.id +New-Subscription -SourceId $rssPodcastLetsMosley.id -DiscordWebhookId $sky.id +New-Subscription -SourceId $rssOmgLinux.id -DiscordWebhookId $miharuMonitor.id +New-Subscription -SourceId $rssEngadget.id -DiscordWebhookId $miharuMonitor.id +New-Subscription -SourceId $rssArsTechnica.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $youtubeGameGrumps.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $youtubeCityPlannerPlays.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $youtubeLinusTechTips.id -DiscordWebhookId $miharuMonitor.id +New-Subscription -SourceId $youtubeFireship.id -DiscordWebhookId $miharuMonitor.id +New-Subscription -SourceId $youtubeClimateTown.id -DiscordWebhookId $miharuMonitor.id New-Subscription -SourceId $twitchNintendo.id -DiscordWebhookId $miharuMonitor.id