[Out of Market] Automated the downloading of latest Jets game in PowerShell

This page summarizes the projects mentioned and recommended in the original post on /r/nyjets

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • yt-dlp

    A feature-rich command-line audio/video downloader

    # Downloads the latest Jets game available from NFLReplay.net # Written by FstLaneUkraine # November 2022 # Last Updated November 2022 # REQUIRED: YT-DLP Information: https://github.com/yt-dlp/yt-dlp/#installation # Update line 11 and 13 to match your particular setup. For line 13, an example is 'D:\Media\NFL'. # Setting variables $YTDLP = "some\path\to\yt-dlp.exe" $YTDLPQuality = "(bestvideo+bestaudio/best)[protocol^=https]" $DownloadPath = "some\path\to\your\media" # Building Jets Game Schedule Hashtable $JetsEvents = @{} $JetsEvents."11-sep-2022" = "NFL - S2022E01 - Baltimore Ravens at New York Jets" $JetsEvents."18-sep-2022" = "NFL - S2022E02 - New York Jets at Cleveland Browns" $JetsEvents."25-sep-2022" = "NFL - S2022E03 - Cincinatti Bengals at New York Jets" $JetsEvents."2-oct-2022" = "NFL - S2022E04 - New York Jets at Pittsburgh Steelers" $JetsEvents."9-oct-2022" = "NFL - S2022E05 - Miami Dolphins at New York Jets" $JetsEvents."17-oct-2022" = "NFL - S2022E06 - New York Jets at Green Bay Packers" $JetsEvents."23-oct-2022" = "NFL - S2022E07 - New York Jets at Denver Broncos" $JetsEvents."29-oct-2022" = "NFL - S2022E08 - New England Patriots at New York Jets" $JetsEvents."6-nov-2022" = "NFL - S2022E09 - Buffalo Bills at New York Jets" $JetsEvents."20-nov-2022" = "NFL - S2022E10 - New York Jets at New England Patriots" $JetsEvents."27-nov-2022" = "NFL - S2022E11 - Chicago Bears at New York Jets" $JetsEvents."4-dec-2022" = "NFL - S2022E12 - New York Jets at Minnesota Vikings" $JetsEvents."11-dec-2022" = "NFL - S2022E13 - New York Jets at Buffalo Bills" $JetsEvents."18-dec-2022" = "NFL - S2022E14 - Detroit Lions at New York Jets" $JetsEvents."22-dec-2022" = "NFL - S2022E15 - Jacksonville Jaguars at New York Jets" $JetsEvents."1-jan-2023" = "NFL - S2022E16 - New York Jets at Seattle Seahawks" $JetsEvents."8-jan-2023" = "NFL - S2022E17 - New York Jets at Miami Dolphins" # Searching main NFLReplay.net Jets page to see what the latest game is $WebResponse = Invoke-WebRequest "https://nflreplay.net/category/new-york-jets/" $GameURL = $WebResponse.Links | Select-Object href -Unique -First 9 | Select-Object -Last 1 # Determining which game is the latest from the Jets schedule in order to properly name resulting file foreach ($JetsEvent in $JetsEvents.GetEnumerator()) { if ($($GameURL).href -match $($JetsEvent.Name)) { $JetsEvent = $($JetsEvent.Value) Write-Host "This weeks game: " -ForegroundColor Green -NoNewline Write-Host "$JetsEvent" Write-Host "" Write-Host "===========================================================================================================" -ForegroundColor Green # Providing URL of latest Jets game available on NFLReplay.net Write-Host "" Write-Host "The latest available New York Jets game is: " -ForegroundColor Cyan -NoNewline Write-Host "$($GameURL.href)" -ForegroundColor Magenta Write-Host " Checking for full game URL..." -ForegroundColor Yellow # Searching for the full game (No-Ads or 720p) version to allow for a single-file download $WebResponse = Invoke-WebRequest $($GameURL.href) $FullGameURL = $WebResponse.Links | Select-Object outerHTML | Where-Object { $_.outerHTML -match 'Noads' -OR $_.outerHTML -match '720P'} | Format-Table -AutoSize | Out-String -Width 1000 # Selecting the full game noads or 720p option to allow for a single-file download if ($FullGameURL -match '(http[s])(:\/\/)([^\s]+)') { $GameLink = $matches[0] $GameLink = $GameLink.Substring(0,$GameLink.Length-1) Write-Host " Full game URL found! URL is: " -ForegroundColor Green -NoNewline Write-Host "$GameLink" -ForegroundColor Cyan # Parsing the web page contents to find the true URL of the file Write-Host " Checking for download link..." -ForegroundColor Yellow $DownloadLinkURL = (Invoke-WebRequest $GameLink -UseBasicParsing).Content if ($DownloadLinkURL -match '(src="\/\/ok)([^\s]+)') { $DownloadLink = $matches[0] $DownloadLink = $DownloadLink.Substring(0,$DownloadLink.Length-1) $DownloadLink = $DownloadLink.Substring(5) $DownloadLink = $DownloadLink.replace('//','https://') Write-Host " Download link found! URL is: " -ForegroundColor Green -NoNewline Write-Host "$DownloadLink" -ForegroundColor Cyan Write-Host " Downloading game..." -Foreground Yellow Write-Host "" $DownloadPath = "$DownloadPath\$JetsEvent" $GameName = "$JetsEvent.mp4" # Downloading game & $YTDLP -f $YTDLPQuality -o $DownloadPath\$GameName $DownloadLink } } else { Write-Host " Full game URL not found!" -ForegroundColor Red } } }

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts