Skip to content

Instantly share code, notes, and snippets.

@cventour
Created January 3, 2022 07:50
Show Gist options
  • Save cventour/b86817e909dc19f6d643599d41d9c372 to your computer and use it in GitHub Desktop.
Save cventour/b86817e909dc19f6d643599d41d9c372 to your computer and use it in GitHub Desktop.
$Content = (Invoke-WebRequest -Uri "https://covid19.innews.gr").Content
$daily_stats = ($content -match '(?<=daily_stats = )(.*)(?=;)')
$daily_stats = $Matches[0] | Out-File "daily_stats.json"
$weekly_stats = $content -match '(?<=weekly_stats = )(.*)(?=;)'
$weekly_stats = $Matches[0] | Out-File "weekly_stats.json"
$three_days_stats = $content -match '(?<=three_days_stats = )(.*)(?=;)'
$three_days_stats = $Matches[0] | Out-File "three_days_stats.json"
$last_stats = $content -match '(?<=last_stats = )(.*)(?=;)'
$last_stats = $Matches[0] | Out-File "last_stats.json"
$total_stats = $content -match '(?<=total_stats = )(.*)(?=;)'
$total_stats = $Matches[0] | Out-File "total_stats.json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment