1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-24 19:02:52 +08:00

Removing temporary scripts

This commit is contained in:
Jan Hoek 2017-03-29 20:47:21 +02:00
parent 481d6638fd
commit f9b06385f1
3 changed files with 0 additions and 77 deletions

View File

@ -1,13 +0,0 @@
Clear-host
$Urls = @{}
$Urls.Add('keuringsdienst', 'https://www.npo.nl/keuringsdienst-van-waarde/KN_1678993/search?category=broadcasts&page=1')
$Urls.Add('jinek', 'https://www.npo.nl/jinek/KN_1676589/search?media_type=broadcast&start=0&rows=8')
$Urls.Add('midsomer', 'https://www.npo.nl/midsomer-murders/POW_00828660/search?media_type=broadcast&start=0&rows=8')
$Urls.Add('pownews', 'https://www.npo.nl/pownews-flits/POW_03469040/search?category=broadcasts&page=1')
$Urls.GetEnumerator() | ForEach-Object {
Write-Host $_.Key
$response = Invoke-WebRequest -Uri ($_.Value) -UseBasicParsing -OutFile "~/Desktop/$($_.Key).txt"
}

View File

@ -1,43 +0,0 @@
Describe 'Flake8' {
It 'Does not return any errors' {
& flake8 /Users/jhoek/GitHub/youtube-dl/youtube_dl/extractor/npo.py | Should BeNullOrEmpty
}
}
Describe 'Tests' {
It 'Should work in Python 2.6' {
& 'python2.6' '--version' 2>&1 | Should Be 'Python 2.6.9'
'', '_1', '_2' | ForEach-Object {
& 'python2.6' /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1
$LASTEXITCODE | Should Be 0
}
}
It 'Should work in Python 2.7' {
& python '--version' 2>&1 | Should Be 'Python 2.7.13'
'', '_1', '_2' | ForEach-Object {
& python /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1
$LASTEXITCODE | Should Be 0
}
}
It 'Should work in Python 3.5' {
& python3 '--version' | Should Be 'Python 3.5.2'
'', '_1', '_2' | ForEach-Object {
& python3 /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1
$LASTEXITCODE | Should Be 0
}
}
It 'Should work in Python 3.6' {
& python3.6 '--version' | Should Be 'Python 3.6.1'
'', '_1', '_2' | ForEach-Object {
& 'python3.6' /Users/jhoek/GitHub/youtube-dl/test/test_download.py "TestDownload.test_NPORecents$($_)" 2>&1
$LASTEXITCODE | Should Be 0
}
}
}

View File

@ -1,21 +0,0 @@
#!/usr/bin/python
import re
npo12files = ['./jinek.htm', './midsomer.htm']
npo3files = ['./keuringsdienst.htm', './pownews.htm']
npo12regex = r"""<div class='span4'>\s*<div class='image-container'>\s*<a href="(.*?)">\s*(<div class="program-not-available">)?"""
npo3regex = r"""<div class='span4 image'>\s*<a href="(.*?)">\s*<div class="meta-container">\s*<div class="meta first">\s*<div class="md-label"><span class="npo-glyph triangle-right"></span></div>\s*<div class="md-value">.*?</div>\s*</div>\s*</div>\s*(<div class="program-not-available">)?"""
for filename in npo12files:
with open(filename) as f:
for match in re.finditer(npo12regex, f.read()):
print(match.group(1), match.group(2) is None)
print('')
for filename in npo3files:
with open(filename) as f:
for match in re.finditer(npo3regex, f.read()):
print(match.group(1), match.group(2) is None)
print('')