Merge branch 'youku_bugfix' of https://github.com/Celthi/youtube-dl into Celthi-youku...
authorYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Dec 2015 06:36:29 +0000 (14:36 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 12 Dec 2015 06:36:29 +0000 (14:36 +0800)
15 files changed:
CONTRIBUTING.md
README.md
docs/supportedsites.md
youtube_dl/downloader/f4m.py
youtube_dl/extractor/__init__.py
youtube_dl/extractor/beeg.py
youtube_dl/extractor/dailymotion.py
youtube_dl/extractor/funimation.py [new file with mode: 0644]
youtube_dl/extractor/ooyala.py
youtube_dl/extractor/pbs.py
youtube_dl/extractor/safari.py
youtube_dl/extractor/vevo.py
youtube_dl/extractor/wdr.py
youtube_dl/postprocessor/ffmpeg.py
youtube_dl/version.py

index 28aae94f83646f4b18456457c1d2904d580a5b6d..f3fe0d4320963ee0ab004d3da5f4b903dc857923 100644 (file)
@@ -34,7 +34,7 @@ For bug reports, this means that your report should contain the *complete* outpu
 
 If your server has multiple IPs or you suspect censorship, adding `--call-home` may be a good idea to get more diagnostics. If the error is `ERROR: Unable to extract ...` and you cannot reproduce it from multiple countries, add `--dump-pages` (warning: this will yield a rather large output, redirect it to the file `log.txt` by adding `>log.txt 2>&1` to your command-line) or upload the `.dump` files you get when you add `--write-pages` [somewhere](https://gist.github.com/).
 
-**Site support requests must contain an example URL**. An example URL is a URL you might want to download, like http://www.youtube.com/watch?v=BaW_jenozKc . There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. http://www.youtube.com/ ) is *not* an example URL.
+**Site support requests must contain an example URL**. An example URL is a URL you might want to download, like `http://www.youtube.com/watch?v=BaW_jenozKc`. There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. `http://www.youtube.com/`) is *not* an example URL.
 
 ###  Are you using the latest version?
 
@@ -42,7 +42,7 @@ Before reporting any issue, type `youtube-dl -U`. This should report that you're
 
 ###  Is the issue already documented?
 
-Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or at https://github.com/rg3/youtube-dl/search?type=Issues . If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity.
+Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or browse the [GitHub Issues](https://github.com/rg3/youtube-dl/search?type=Issues) of this repository. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity.
 
 ###  Why are existing options not enough?
 
index e39f71281ecfa818cc8e4bb60b98cd7c6d18a1ff..5c3915d64deed1c71d092bf1efe7b363fdc85444 100644 (file)
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ You can also use pip:
 
     sudo pip install youtube-dl
 
-Alternatively, refer to the [developer instructions](#developer-instructions) for how to check out and work with the git repository. For further options, including PGP signatures, see https://rg3.github.io/youtube-dl/download.html .
+Alternatively, refer to the [developer instructions](#developer-instructions) for how to check out and work with the git repository. For further options, including PGP signatures, see the [youtube-dl Download Page](https://rg3.github.io/youtube-dl/download.html).
 
 # DESCRIPTION
 **youtube-dl** is a small command-line program to download videos from
@@ -414,7 +414,7 @@ You can configure youtube-dl by placing any supported command line option to a c
 
 You can use `--ignore-config` if you want to disable the configuration file for a particular youtube-dl run.
 
-### Authentication with `.netrc` file ###
+### Authentication with `.netrc` file
 
 You may also want to configure automatic credentials storage for extractors that support authentication (by providing login and password with `--username` and `--password`) in order not to pass credentials as command line arguments on every youtube-dl execution and prevent tracking plain text passwords in the shell command history. You can achieve this using a [`.netrc` file](http://stackoverflow.com/tags/.netrc/info) on per extractor basis. For that you will need to create a`.netrc` file in your `$HOME` and restrict permissions to read/write by you only:
 ```
@@ -559,11 +559,11 @@ If you want to play the video on a machine that is not running youtube-dl, you c
 
 YouTube has switched to a new video info format in July 2011 which is not supported by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl.
 
-### ERROR: unable to download video ###
+### ERROR: unable to download video
 
 YouTube requires an additional signature since September 2012 which is not supported by old versions of youtube-dl. See [above](#how-do-i-update-youtube-dl) for how to update youtube-dl.
 
-### Video URL contains an ampersand and I'm getting some strange output `[1] 2839` or `'v' is not recognized as an internal or external command` ###
+### Video URL contains an ampersand and I'm getting some strange output `[1] 2839` or `'v' is not recognized as an internal or external command`
 
 That's actually the output from your shell. Since ampersand is one of the special shell characters it's interpreted by the shell preventing you from passing the whole URL to youtube-dl. To disable your shell from interpreting the ampersands (or any other special characters) you have to either put the whole URL in quotes or escape them with a backslash (which approach will work depends on your shell).
 
@@ -587,7 +587,7 @@ In February 2015, the new YouTube player contained a character sequence in a str
 
 These two error codes indicate that the service is blocking your IP address because of overuse. Contact the service and ask them to unblock your IP address, or - if you have acquired a whitelisted IP address already - use the [`--proxy` or `--source-address` options](#network-options) to select another IP address.
 
-### SyntaxError: Non-ASCII character ###
+### SyntaxError: Non-ASCII character
 
 The error
 
@@ -616,7 +616,7 @@ From then on, after restarting your shell, you will be able to access both youtu
 
 Use the `-o` to specify an [output template](#output-template), for example `-o "/home/user/videos/%(title)s-%(id)s.%(ext)s"`. If you want this for all of your downloads, put the option into your [configuration file](#configuration).
 
-### How do I download a video starting with a `-` ?
+### How do I download a video starting with a `-`?
 
 Either prepend `http://www.youtube.com/watch?v=` or separate the ID from the options with `--`:
 
@@ -798,7 +798,7 @@ with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 
 # BUGS
 
-Bugs and suggestions should be reported at: <https://github.com/rg3/youtube-dl/issues> . Unless you were prompted so or there is another pertinent reason (e.g. GitHub fails to accept the bug report), please do not send bug reports via personal email. For discussions, join us in the irc channel #youtube-dl on freenode.
+Bugs and suggestions should be reported at: <https://github.com/rg3/youtube-dl/issues>. Unless you were prompted so or there is another pertinent reason (e.g. GitHub fails to accept the bug report), please do not send bug reports via personal email. For discussions, join us in the IRC channel [#youtube-dl](irc://chat.freenode.net/#youtube-dl) on freenode ([webchat](http://webchat.freenode.net/?randomnick=1&channels=youtube-dl)).
 
 **Please include the full output of youtube-dl when run with `-v`**, i.e. add `-v` flag to your command line, copy the **whole** output and post it in the issue body wrapped in \`\`\` for better formatting. It should look similar to this:
 ```
@@ -836,7 +836,7 @@ For bug reports, this means that your report should contain the *complete* outpu
 
 If your server has multiple IPs or you suspect censorship, adding `--call-home` may be a good idea to get more diagnostics. If the error is `ERROR: Unable to extract ...` and you cannot reproduce it from multiple countries, add `--dump-pages` (warning: this will yield a rather large output, redirect it to the file `log.txt` by adding `>log.txt 2>&1` to your command-line) or upload the `.dump` files you get when you add `--write-pages` [somewhere](https://gist.github.com/).
 
-**Site support requests must contain an example URL**. An example URL is a URL you might want to download, like http://www.youtube.com/watch?v=BaW_jenozKc . There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. http://www.youtube.com/ ) is *not* an example URL.
+**Site support requests must contain an example URL**. An example URL is a URL you might want to download, like `http://www.youtube.com/watch?v=BaW_jenozKc`. There should be an obvious video present. Except under very special circumstances, the main page of a video service (e.g. `http://www.youtube.com/`) is *not* an example URL.
 
 ###  Are you using the latest version?
 
@@ -844,7 +844,7 @@ Before reporting any issue, type `youtube-dl -U`. This should report that you're
 
 ###  Is the issue already documented?
 
-Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or at https://github.com/rg3/youtube-dl/search?type=Issues . If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity.
+Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or browse the [GitHub Issues](https://github.com/rg3/youtube-dl/search?type=Issues) of this repository. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity.
 
 ###  Why are existing options not enough?
 
@@ -874,4 +874,4 @@ It may sound strange, but some bug reports we receive are completely unrelated t
 
 youtube-dl is released into the public domain by the copyright holders.
 
-This README file was originally written by Daniel Bolton (<https://github.com/dbbolton>) and is likewise released into the public domain.
+This README file was originally written by [Daniel Bolton](https://github.com/dbbolton) and is likewise released into the public domain.
index 4f19cb6f5ff5d8fddf265ed6d0263cc11ac902d6..3bb3abb2539cf16ccc0791551ba6b538dd9f9774 100644 (file)
  - **orf:tvthek**: ORF TVthek
  - **parliamentlive.tv**: UK parliament videos
  - **Patreon**
- - **pbs**: Public Broadcasting Service (PBS) and member stations: PBS: Public Broadcasting Service, APT - Alabama Public Television (WBIQ), GPB/Georgia Public Broadcasting (WGTV), Mississippi Public Broadcasting (WMPN), Nashville Public Television (WNPT), WFSU-TV (WFSU), WSRE (WSRE), WTCI (WTCI), WPBA/Channel 30 (WPBA), Alaska Public Media (KAKM), KUAC (KUAC), 360 North (KTOO), KUAT 6 (KUAT), Arizona PBS (KAET), KNME-TV/Channel 5 (KNME), Vegas PBS (KLVX), AETN/ARKANSAS ETV NETWORK (KETS), KET (WKLE), WKNO/Channel 10 (WKNO), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), Mississippi Public Broadcasting (WMPN), OETA (KETA), Ozarks Public Television (KOZK), WSIU Public Broadcasting (WSIU), KEET TV (KEET), KIXE/Channel 9 (KIXE), KPBS San Diego (KPBS), KQED (KQED), KVIE Public Television (KVIE), PBS SoCal/KOCE (KOCE), ValleyPBS (KVPT), APT - Alabama Public Television (WBIQ), CONNECTICUT PUBLIC TELEVISION (WEDH), Arizona PBS (KAET), KNPB Channel 5 (KNPB), SOPTV (KSYS), KLCS/Channel 58 (KLCS), KRCB Television & Radio (KRCB), KVCR TV/DT/FM :: Vision for the Future (KVCR), Rocky Mountain PBS (KRMA), KENW-TV3 (KENW), KUED Channel 7 (KUED), KNME-TV/Channel 5 (KNME), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), CONNECTICUT PUBLIC TELEVISION (WEDH), Thirteen/WNET New York (WNET), WGBH/Channel 2 (WGBH), WGBY (WGBY), NJTV Public Media NJ (WNJT), Rhode Island PBS (WSBE), WLIW21 (WLIW), mpt/Maryland Public Television (WMPB), WETA Television and Radio (WETA), WHYY (WHYY), NJTV Public Media NJ (WNJT), PBS 39 (WLVT), WLIW21 (WLIW), WETA Television and Radio (WETA), mpt/Maryland Public Television (WMPB), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), WEDU PBS (WEDU), WFSU-TV (WFSU), WGCU Public Media (WGCU), WJCT Public Broadcasting (WJCT), WPBT2 (WPBT), WSRE (WSRE), WUCF TV (WUCF), WUFT/Channel 5 (WUFT), WXEL/Channel 42 (WXEL), APT - Alabama Public Television (WBIQ), GPB/Georgia Public Broadcasting (WGTV), WLRN/Channel 17 (WLRN), WUSF Public Broadcasting (WUSF), NJTV Public Media NJ (WNJT), GPB/Georgia Public Broadcasting (WGTV), APT - Alabama Public Television (WBIQ), ETV (WRLK), UNC-TV (WUNC), WFSU-TV (WFSU), WJCT Public Broadcasting (WJCT), WTCI (WTCI), WPBA/Channel 30 (WPBA), PBS Guam (KGTF), PBS Hawaii - Oceanic Cable Channel 10 (KHET), Idaho Public Television (KAID), KSPS (KSPS), KUED Channel 7 (KUED), OPB (KOPB), SOPTV (KSYS), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WILL-TV (WILL), Network Knowledge - WSEC/Springfield (WSEC), WSIU Public Broadcasting (WSIU), WTTW11 (WTTW), WTVP & WTVP.org, Public Media for Central Illinois (WTVP), Iowa Public Television/IPTV (KDIN), KET (WKLE), Nine Network (KETC), PBS39 Fort Wayne (WFWA), WFYI Indianapolis (WFYI), Milwaukee Public Television (WMVS), WNIN (WNIN), WNIT Public Television (WNIT), WPT (WPNE), WVUT/Channel 22 (WVUT), WEIU/Channel 51 (WEIU), WQPT-TV (WQPT), WYCC PBS Chicago (WYCC), Lakeshore Public Television (WYIN), PBS39 Fort Wayne (WFWA), WFYI Indianapolis (WFYI), WIPB-TV (WIPB), WNIN (WNIN), WNIT Public Television (WNIT), WTIU (WTIU), WVUT/Channel 22 (WVUT), CET  (WCET), KET (WKLE), ThinkTVNetwork (WPTD), WBGU-TV (WBGU), WGVU TV (WGVU), WILL-TV (WILL), Network Knowledge - WSEC/Springfield (WSEC), WSIU Public Broadcasting (WSIU), WTTW11 (WTTW), Lakeshore Public Television (WYIN), WEIU/Channel 51 (WEIU), WYCC PBS Chicago (WYCC), Iowa Public Television/IPTV (KDIN), NET1 (KUON), Pioneer Public Television (KWCM), SDPB Television (KUSD), TPT (KTCA), Network Knowledge - WSEC/Springfield (WSEC), WPT (WPNE), KSMQ (KSMQ), WQPT-TV (WQPT), KPTS/Channel 8 (KPTS), KTWU/Channel 11 (KTWU), Smoky Hills Public Television (KOOD), KCPT Kansas City Public Television (KCPT), NET1 (KUON), OETA (KETA), Ozarks Public Television (KOZK), Rocky Mountain PBS (KRMA), Colorado Public Television / KBDI 12 (KBDI), KET (WKLE), Blue Ridge PBS (WBRA), CET  (WCET), East Tennessee PBS (WSJK), Nashville Public Television (WNPT), ThinkTVNetwork (WPTD), WCTE-TV (WCTE), WLJT, Channel 11 (WLJT), WNIN (WNIN), WOSU TV (WOSU), WOUB/WOUC (WOUB), WSIU Public Broadcasting (WSIU), WVPB (WVPB), WKYU-PBS (WKYU), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), WYES-TV/New Orleans (WYES), AETN/ARKANSAS ETV NETWORK (KETS), KERA 13 (KERA), Mississippi Public Broadcasting (WMPN), MPBN (WCBB), Mountain Lake PBS (WCFE), NHPTV (WENH), Vermont PBS (WETK), WGBH/Channel 2 (WGBH), mpt/Maryland Public Television (WMPB), Thirteen/WNET New York (WNET), WETA Television and Radio (WETA), WHYY (WHYY), witf (WITF), WQED Multimedia (WQED), WVPB (WVPB), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), WLIW21 (WLIW), WGBH/Channel 2 (WGBH), WGBY (WGBY), CONNECTICUT PUBLIC TELEVISION (WEDH), NHPTV (WENH), Vermont PBS (WETK), WMHT Educational Telecommunications (WMHT), Rhode Island PBS (WSBE), Q-TV (WDCQ), WTVS Detroit Public TV (WTVS), CMU Public Television (WCMU), WGVU TV (WGVU), WKAR-TV (WKAR), WNMU-TV Public TV 13 (WNMU), WDSE - WRPT (WDSE), WBGU-TV (WBGU), WGTE TV (WGTE), WNIT Public Television (WNIT), WPT (WPNE), WTTW11 (WTTW), WYCC PBS Chicago (WYCC), Lakeland Public Television (KAWE), WDSE - WRPT (WDSE), Pioneer Public Television (KWCM), TPT (KTCA), Iowa Public Television/IPTV (KDIN), PRAIRIE PUBLIC (KFME), Nine Network (KETC), SDPB Television (KUSD), WPT (WPNE), KSMQ (KSMQ), Mississippi Public Broadcasting (WMPN), AETN/ARKANSAS ETV NETWORK (KETS), APT - Alabama Public Television (WBIQ), WKNO/Channel 10 (WKNO), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), WSRE (WSRE), WYES-TV/New Orleans (WYES), KCPT Kansas City Public Television (KCPT), KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS), Nine Network (KETC), Ozarks Public Television (KOZK), AETN/ARKANSAS ETV NETWORK (KETS), WTVS Detroit Public TV (WTVS), Iowa Public Television/IPTV (KDIN), KET (WKLE), WKNO/Channel 10 (WKNO), KTWU/Channel 11 (KTWU), NET1 (KUON), Rocky Mountain PBS (KRMA), Network Knowledge - WSEC/Springfield (WSEC), WSIU Public Broadcasting (WSIU), MontanaPBS (KUSM), Arizona PBS (KAET), Idaho Public Television (KAID), PRAIRIE PUBLIC (KFME), KSPS (KSPS), Rocky Mountain PBS (KRMA), SDPB Television (KUSD), NET1 (KUON), Iowa Public Television/IPTV (KDIN), KTWU/Channel 11 (KTWU), Pioneer Public Television (KWCM), Rocky Mountain PBS (KRMA), SDPB Television (KUSD), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KNPB Channel 5 (KNPB), Vegas PBS (KLVX), Arizona PBS (KAET), KUED Channel 7 (KUED), PBS SoCal/KOCE (KOCE), KBYU-TV (KBYU), NHPTV (WENH), ETV (WRLK), Mountain Lake PBS (WCFE), MPBN (WCBB), Vermont PBS (WETK), WGBH/Channel 2 (WGBH), WGBY (WGBY), CONNECTICUT PUBLIC TELEVISION (WEDH), Thirteen/WNET New York (WNET), WHYY (WHYY), NJTV Public Media NJ (WNJT), PBS 39 (WLVT), WLIW21 (WLIW), KENW-TV3 (KENW), KRWG/Channel 22 (KRWG), KNME-TV/Channel 5 (KNME), KUAT 6 (KUAT), KACV (KACV), KCOS/Channel 13 (KCOS), KUED Channel 7 (KUED), OETA (KETA), Rocky Mountain PBS (KRMA), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), Mountain Lake PBS (WCFE), Thirteen/WNET New York (WNET), WCNY/Channel 24 (WCNY), WMHT Educational Telecommunications (WMHT), WNED (WNED), WPBS (WPBS), WSKG Public TV (WSKG), WXXI (WXXI), CONNECTICUT PUBLIC TELEVISION (WEDH), NHPTV (WENH), Vermont PBS (WETK), WGBH/Channel 2 (WGBH), WPSU (WPSU), WQLN/Channel 54 (WQLN), WVIA Public Media Studios (WVIA), WLIW21 (WLIW), NJTV Public Media NJ (WNJT), UNC-TV (WUNC), WTVI (WTVI), Blue Ridge PBS (WBRA), ETV (WRLK), GPB/Georgia Public Broadcasting (WGTV), WHRO (WHRO), WTCI (WTCI), WPBA/Channel 30 (WPBA), PRAIRIE PUBLIC (KFME), SDPB Television (KUSD), CET  (WCET), ThinkTVNetwork (WPTD), WBGU-TV (WBGU), WGTE TV (WGTE), Western Reserve PBS (WNEO), WOSU TV (WOSU), WOUB/WOUC (WOUB), WVIZ/PBS ideastream (WVIZ), WTVS Detroit Public TV (WTVS), KET (WKLE), PBS39 Fort Wayne (WFWA), WIPB-TV (WIPB), WQED Multimedia (WQED), WQLN/Channel 54 (WQLN), WVPB (WVPB), OETA (KETA), AETN/ARKANSAS ETV NETWORK (KETS), KACV (KACV), KERA 13 (KERA), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), Ozarks Public Television (KOZK), OPB (KOPB), SOPTV (KSYS), Idaho Public Television (KAID), KCTS 9 (KCTS), KEET TV (KEET), KSPS (KSPS), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WHYY (WHYY), witf (WITF), WPSU (WPSU), WQED Multimedia (WQED), WQLN/Channel 54 (WQLN), WVIA Public Media Studios (WVIA), CONNECTICUT PUBLIC TELEVISION (WEDH), mpt/Maryland Public Television (WMPB), Thirteen/WNET New York (WNET), WETA Television and Radio (WETA), WNED (WNED), Western Reserve PBS (WNEO), WSKG Public TV (WSKG), WVIZ/PBS ideastream (WVIZ), WVPB (WVPB), WVPT - Your Source for PBS and More! (WVPT), PBS 39 (WLVT), NJTV Public Media NJ (WNJT), Howard University Television (WHUT), WLIW21 (WLIW), CONNECTICUT PUBLIC TELEVISION (WEDH), NHPTV (WENH), WGBH/Channel 2 (WGBH), Rhode Island PBS (WSBE), ETV (WRLK), GPB/Georgia Public Broadcasting (WGTV), UNC-TV (WUNC), WTVI (WTVI), WPBA/Channel 30 (WPBA), SDPB Television (KUSD), Iowa Public Television/IPTV (KDIN), PRAIRIE PUBLIC (KFME), NET1 (KUON), Pioneer Public Television (KWCM), East Tennessee PBS (WSJK), WKNO/Channel 10 (WKNO), Nashville Public Television (WNPT), WCTE-TV (WCTE), WLJT, Channel 11 (WLJT), WTCI (WTCI), APT - Alabama Public Television (WBIQ), Blue Ridge PBS (WBRA), GPB/Georgia Public Broadcasting (WGTV), Lakeland Public Television (KAWE), KET (WKLE), Mississippi Public Broadcasting (WMPN), UNC-TV (WUNC), Western Reserve PBS (WNEO), WSIU Public Broadcasting (WSIU), WVIZ/PBS ideastream (WVIZ), WKYU-PBS (WKYU), WPBA/Channel 30 (WPBA), Basin PBS (KPBT), KUHT / Channel 8 (KUHT), KACV (KACV), KAMU - TV (KAMU), KCOS/Channel 13 (KCOS), KEDT/Channel 16 (KEDT), KERA 13 (KERA), KLRN (KLRN), KLRU (KLRU), KMBH-TV (KMBH), KNCT (KNCT), KTTZ-TV (KTXT), AETN/ARKANSAS ETV NETWORK (KETS), KENW-TV3 (KENW), KRWG/Channel 22 (KRWG), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), NET1 (KUON), KNME-TV/Channel 5 (KNME), Nashville Public Television (WNPT), OETA (KETA), Rocky Mountain PBS (KRMA), KUED Channel 7 (KUED), Idaho Public Television (KAID), Vegas PBS (KLVX), KBYU-TV (KBYU), Vermont PBS (WETK), Mountain Lake PBS (WCFE), NHPTV (WENH), WGBH/Channel 2 (WGBH), WGBY (WGBY), WMHT Educational Telecommunications (WMHT), WTJX Channel 12 (WTJX), Blue Ridge PBS (WBRA), WCVE PBS (WCVE), WHRO (WHRO), WVPT - Your Source for PBS and More! (WVPT), East Tennessee PBS (WSJK), KET (WKLE), mpt/Maryland Public Television (WMPB), UNC-TV (WUNC), WETA Television and Radio (WETA), Howard University Television (WHUT), KCTS 9 (KCTS), KSPS (KSPS), Idaho Public Television (KAID), OPB (KOPB), KBTC Public Television (KBTC), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WVPB (WVPB), Blue Ridge PBS (WBRA), KET (WKLE), mpt/Maryland Public Television (WMPB), WETA Television and Radio (WETA), Western Reserve PBS (WNEO), WOSU TV (WOSU), WOUB/WOUC (WOUB), WQED Multimedia (WQED), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), Milwaukee Public Television (WMVS), WPT (WPNE), Iowa Public Television/IPTV (KDIN), Lakeland Public Television (KAWE), WDSE - WRPT (WDSE), TPT (KTCA), WNMU-TV Public TV 13 (WNMU), WTTW11 (WTTW), KSMQ (KSMQ), WYCC PBS Chicago (WYCC), Wyoming PBS (KCWC), Idaho Public Television (KAID), KUED Channel 7 (KUED), MontanaPBS (KUSM), NET1 (KUON), Rocky Mountain PBS (KRMA), SDPB Television (KUSD), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU)
+ - **pbs**: Public Broadcasting Service (PBS) and member stations: PBS: Public Broadcasting Service, APT - Alabama Public Television (WBIQ), GPB/Georgia Public Broadcasting (WGTV), Mississippi Public Broadcasting (WMPN), Nashville Public Television (WNPT), WFSU-TV (WFSU), WSRE (WSRE), WTCI (WTCI), WPBA/Channel 30 (WPBA), Alaska Public Media (KAKM), Arizona PBS (KAET), KNME-TV/Channel 5 (KNME), Vegas PBS (KLVX), AETN/ARKANSAS ETV NETWORK (KETS), KET (WKLE), WKNO/Channel 10 (WKNO), LPB/LOUISIANA PUBLIC BROADCASTING (WLPB), OETA (KETA), Ozarks Public Television (KOZK), WSIU Public Broadcasting (WSIU), KEET TV (KEET), KIXE/Channel 9 (KIXE), KPBS San Diego (KPBS), KQED (KQED), KVIE Public Television (KVIE), PBS SoCal/KOCE (KOCE), ValleyPBS (KVPT), CONNECTICUT PUBLIC TELEVISION (WEDH), KNPB Channel 5 (KNPB), SOPTV (KSYS), Rocky Mountain PBS (KRMA), KENW-TV3 (KENW), KUED Channel 7 (KUED), Wyoming PBS (KCWC), Colorado Public Television / KBDI 12 (KBDI), KBYU-TV (KBYU), Thirteen/WNET New York (WNET), WGBH/Channel 2 (WGBH), WGBY (WGBY), NJTV Public Media NJ (WNJT), WLIW21 (WLIW), mpt/Maryland Public Television (WMPB), WETA Television and Radio (WETA), WHYY (WHYY), PBS 39 (WLVT), WVPT - Your Source for PBS and More! (WVPT), Howard University Television (WHUT), WEDU PBS (WEDU), WGCU Public Media (WGCU), WPBT2 (WPBT), WUCF TV (WUCF), WUFT/Channel 5 (WUFT), WXEL/Channel 42 (WXEL), WLRN/Channel 17 (WLRN), WUSF Public Broadcasting (WUSF), ETV (WRLK), UNC-TV (WUNC), PBS Hawaii - Oceanic Cable Channel 10 (KHET), Idaho Public Television (KAID), KSPS (KSPS), OPB (KOPB), KWSU/Channel 10 & KTNW/Channel 31 (KWSU), WILL-TV (WILL), Network Knowledge - WSEC/Springfield (WSEC), WTTW11 (WTTW), Iowa Public Television/IPTV (KDIN), Nine Network (KETC), PBS39 Fort Wayne (WFWA), WFYI Indianapolis (WFYI), Milwaukee Public Television (WMVS), WNIN (WNIN), WNIT Public Television (WNIT), WPT (WPNE), WVUT/Channel 22 (WVUT), WEIU/Channel 51 (WEIU), WQPT-TV (WQPT), WYCC PBS Chicago (WYCC), WIPB-TV (WIPB), WTIU (WTIU), CET  (WCET), ThinkTVNetwork (WPTD), WBGU-TV (WBGU), WGVU TV (WGVU), NET1 (KUON), Pioneer Public Television (KWCM), SDPB Television (KUSD), TPT (KTCA), KSMQ (KSMQ), KPTS/Channel 8 (KPTS), KTWU/Channel 11 (KTWU), East Tennessee PBS (WSJK), WCTE-TV (WCTE), WLJT, Channel 11 (WLJT), WOSU TV (WOSU), WOUB/WOUC (WOUB), WVPB (WVPB), WKYU-PBS (WKYU), KERA 13 (KERA), MPBN (WCBB), Mountain Lake PBS (WCFE), NHPTV (WENH), Vermont PBS (WETK), witf (WITF), WQED Multimedia (WQED), WMHT Educational Telecommunications (WMHT), Q-TV (WDCQ), WTVS Detroit Public TV (WTVS), CMU Public Television (WCMU), WKAR-TV (WKAR), WNMU-TV Public TV 13 (WNMU), WDSE - WRPT (WDSE), WGTE TV (WGTE), Lakeland Public Television (KAWE), KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS), MontanaPBS (KUSM), KRWG/Channel 22 (KRWG), KACV (KACV), KCOS/Channel 13 (KCOS), WCNY/Channel 24 (WCNY), WNED (WNED), WPBS (WPBS), WSKG Public TV (WSKG), WXXI (WXXI), WPSU (WPSU), WVIA Public Media Studios (WVIA), WTVI (WTVI), Western Reserve PBS (WNEO), WVIZ/PBS ideastream (WVIZ), KCTS 9 (KCTS), Basin PBS (KPBT), KUHT / Channel 8 (KUHT), KLRN (KLRN), KLRU (KLRU), WTJX Channel 12 (WTJX), WCVE PBS (WCVE), KBTC Public Television (KBTC)
  - **Periscope**: Periscope
  - **PhilharmonieDeParis**: Philharmonie de Paris
  - **Phoenix**
index 6170cc1552194104ea1f029ec9b54c2b051e7a9c..aaf0c49c8cb474e397a71988502848ed8351336b 100644 (file)
@@ -15,6 +15,7 @@ from ..compat import (
 )
 from ..utils import (
     encodeFilename,
+    fix_xml_ampersands,
     sanitize_open,
     struct_pack,
     struct_unpack,
@@ -288,7 +289,10 @@ class F4mFD(FragmentFD):
         self.to_screen('[%s] Downloading f4m manifest' % self.FD_NAME)
         urlh = self.ydl.urlopen(man_url)
         man_url = urlh.geturl()
-        manifest = urlh.read()
+        # Some manifests may be malformed, e.g. prosiebensat1 generated manifests
+        # (see https://github.com/rg3/youtube-dl/issues/6215#issuecomment-121704244
+        # and https://github.com/rg3/youtube-dl/issues/7823)
+        manifest = fix_xml_ampersands(urlh.read().decode('utf-8', 'ignore')).strip()
 
         doc = compat_etree_fromstring(manifest)
         formats = [(int(f.attrib.get('bitrate', -1)), f)
index 3db5cd6d97cea831e0adbad7ecaf62287e7d2b27..3cd95ba01afef548cfaab03e1d6185d077a61b91 100644 (file)
@@ -206,6 +206,7 @@ from .francetv import (
 from .freesound import FreesoundIE
 from .freespeech import FreespeechIE
 from .freevideo import FreeVideoIE
+from .funimation import FunimationIE
 from .funnyordie import FunnyOrDieIE
 from .gameinformer import GameInformerIE
 from .gamekings import GamekingsIE
index d151d38c9ceffc5a4c1e4a179c396cba54a2c9fb..c8d921daf1c7c25d548945fbb104cb5b7181a538 100644 (file)
@@ -34,15 +34,29 @@ class BeegIE(InfoExtractor):
         video_id = self._match_id(url)
 
         video = self._download_json(
-            'http://beeg.com/api/v4/video/%s' % video_id, video_id)
+            'http://beeg.com/api/v5/video/%s' % video_id, video_id)
+
+        def split(o, e):
+            def cut(s, x):
+                n.append(s[:x])
+                return s[x:]
+            n = []
+            r = len(o) % e
+            if r > 0:
+                o = cut(o, r)
+            while len(o) > e:
+                o = cut(o, e)
+            n.append(o)
+            return n
 
         def decrypt_key(key):
-            # Reverse engineered from http://static.beeg.com/cpl/1067.js
-            a = '8RPUUCS35ZWp3ADnKcSmpH71ZusrROo'
+            # Reverse engineered from http://static.beeg.com/cpl/1105.js
+            a = '5ShMcIQlssOd7zChAIOlmeTZDaUxULbJRnywYaiB'
             e = compat_urllib_parse_unquote(key)
-            return ''.join([
-                compat_chr(compat_ord(e[n]) - compat_ord(a[n % len(a)]) % 25)
+            o = ''.join([
+                compat_chr(compat_ord(e[n]) - compat_ord(a[n % len(a)]) % 21)
                 for n in range(len(e))])
+            return ''.join(split(o, 3)[::-1])
 
         def decrypt_url(encrypted_url):
             encrypted_url = self._proto_relative_url(
index ab7f3aec42ff7807f03095ba269bc5f989541870..428556213239651a6994cedf22c78d62d81e0434 100644 (file)
@@ -99,6 +99,11 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
         {
             'url': 'http://www.dailymotion.com/video/xhza0o',
             'only_matching': True,
+        },
+        # with subtitles
+        {
+            'url': 'http://www.dailymotion.com/video/x20su5f_the-power-of-nightmares-1-the-rise-of-the-politics-of-fear-bbc-2004_news',
+            'only_matching': True,
         }
     ]
 
@@ -122,7 +127,9 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
             webpage, 'comment count', fatal=False))
 
         player_v5 = self._search_regex(
-            [r'buildPlayer\(({.+?})\);', r'playerV5\s*=\s*dmp\.create\([^,]+?,\s*({.+?})\);'],
+            [r'buildPlayer\(({.+?})\);\n',  # See https://github.com/rg3/youtube-dl/issues/7826
+             r'playerV5\s*=\s*dmp\.create\([^,]+?,\s*({.+?})\);',
+             r'buildPlayer\(({.+?})\);'],
             webpage, 'player v5', default=None)
         if player_v5:
             player = self._parse_json(player_v5, video_id)
@@ -172,11 +179,13 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
             uploader_id = metadata.get('owner', {}).get('id')
 
             subtitles = {}
-            for subtitle_lang, subtitle in metadata.get('subtitles', {}).get('data', {}).items():
-                subtitles[subtitle_lang] = [{
-                    'ext': determine_ext(subtitle_url),
-                    'url': subtitle_url,
-                } for subtitle_url in subtitle.get('urls', [])]
+            subtitles_data = metadata.get('subtitles', {}).get('data', {})
+            if subtitles_data and isinstance(subtitles_data, dict):
+                for subtitle_lang, subtitle in subtitles_data.items():
+                    subtitles[subtitle_lang] = [{
+                        'ext': determine_ext(subtitle_url),
+                        'url': subtitle_url,
+                    } for subtitle_url in subtitle.get('urls', [])]
 
             return {
                 'id': video_id,
diff --git a/youtube_dl/extractor/funimation.py b/youtube_dl/extractor/funimation.py
new file mode 100644 (file)
index 0000000..8a65343
--- /dev/null
@@ -0,0 +1,187 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+import re
+
+from .common import InfoExtractor
+from ..utils import (
+    clean_html,
+    determine_ext,
+    encode_dict,
+    int_or_none,
+    sanitized_Request,
+    ExtractorError,
+    urlencode_postdata
+)
+
+
+class FunimationIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?funimation\.com/shows/[^/]+/videos/(?:official|promotional)/(?P<id>[^/?#&]+)'
+
+    _TESTS = [{
+        'url': 'http://www.funimation.com/shows/air/videos/official/breeze',
+        'info_dict': {
+            'id': '658',
+            'display_id': 'breeze',
+            'ext': 'mp4',
+            'title': 'Air - 1 - Breeze',
+            'description': 'md5:1769f43cd5fc130ace8fd87232207892',
+            'thumbnail': 're:https?://.*\.jpg',
+        },
+    }, {
+        'url': 'http://www.funimation.com/shows/hacksign/videos/official/role-play',
+        'info_dict': {
+            'id': '31128',
+            'display_id': 'role-play',
+            'ext': 'mp4',
+            'title': '.hack//SIGN - 1 - Role Play',
+            'description': 'md5:b602bdc15eef4c9bbb201bb6e6a4a2dd',
+            'thumbnail': 're:https?://.*\.jpg',
+        },
+    }, {
+        'url': 'http://www.funimation.com/shows/attack-on-titan-junior-high/videos/promotional/broadcast-dub-preview',
+        'info_dict': {
+            'id': '9635',
+            'display_id': 'broadcast-dub-preview',
+            'ext': 'mp4',
+            'title': 'Attack on Titan: Junior High - Broadcast Dub Preview',
+            'description': 'md5:f8ec49c0aff702a7832cd81b8a44f803',
+            'thumbnail': 're:https?://.*\.(?:jpg|png)',
+        },
+    }]
+
+    def _login(self):
+        (username, password) = self._get_login_info()
+        if username is None:
+            return
+        data = urlencode_postdata(encode_dict({
+            'email_field': username,
+            'password_field': password,
+        }))
+        login_request = sanitized_Request('http://www.funimation.com/login', data, headers={
+            'User-Agent': 'Mozilla/5.0 (Windows NT 5.2; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0',
+            'Content-Type': 'application/x-www-form-urlencoded'
+        })
+        login = self._download_webpage(
+            login_request, None, 'Logging in as %s' % username)
+        if re.search(r'<meta property="og:url" content="http://www.funimation.com/login"/>', login) is not None:
+            raise ExtractorError('Unable to login, wrong username or password.', expected=True)
+
+    def _real_initialize(self):
+        self._login()
+
+    def _real_extract(self, url):
+        display_id = self._match_id(url)
+
+        errors = []
+        formats = []
+
+        ERRORS_MAP = {
+            'ERROR_MATURE_CONTENT_LOGGED_IN': 'matureContentLoggedIn',
+            'ERROR_MATURE_CONTENT_LOGGED_OUT': 'matureContentLoggedOut',
+            'ERROR_SUBSCRIPTION_LOGGED_OUT': 'subscriptionLoggedOut',
+            'ERROR_VIDEO_EXPIRED': 'videoExpired',
+            'ERROR_TERRITORY_UNAVAILABLE': 'territoryUnavailable',
+            'SVODBASIC_SUBSCRIPTION_IN_PLAYER': 'basicSubscription',
+            'SVODNON_SUBSCRIPTION_IN_PLAYER': 'nonSubscription',
+            'ERROR_PLAYER_NOT_RESPONDING': 'playerNotResponding',
+            'ERROR_UNABLE_TO_CONNECT_TO_CDN': 'unableToConnectToCDN',
+            'ERROR_STREAM_NOT_FOUND': 'streamNotFound',
+        }
+
+        USER_AGENTS = (
+            # PC UA is served with m3u8 that provides some bonus lower quality formats
+            ('pc', 'Mozilla/5.0 (Windows NT 5.2; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0'),
+            # Mobile UA allows to extract direct links and also does not fail when
+            # PC UA fails with hulu error (e.g.
+            # http://www.funimation.com/shows/hacksign/videos/official/role-play)
+            ('mobile', 'Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36'),
+        )
+
+        for kind, user_agent in USER_AGENTS:
+            request = sanitized_Request(url)
+            request.add_header('User-Agent', user_agent)
+            webpage = self._download_webpage(
+                request, display_id, 'Downloading %s webpage' % kind)
+
+            playlist = self._parse_json(
+                self._search_regex(
+                    r'var\s+playersData\s*=\s*(\[.+?\]);\n',
+                    webpage, 'players data'),
+                display_id)[0]['playlist']
+
+            items = next(item['items'] for item in playlist if item.get('items'))
+            item = next(item for item in items if item.get('itemAK') == display_id)
+
+            error_messages = {}
+            video_error_messages = self._search_regex(
+                r'var\s+videoErrorMessages\s*=\s*({.+?});\n',
+                webpage, 'error messages', default=None)
+            if video_error_messages:
+                error_messages_json = self._parse_json(video_error_messages, display_id, fatal=False)
+                if error_messages_json:
+                    for _, error in error_messages_json.items():
+                        type_ = error.get('type')
+                        description = error.get('description')
+                        content = error.get('content')
+                        if type_ == 'text' and description and content:
+                            error_message = ERRORS_MAP.get(description)
+                            if error_message:
+                                error_messages[error_message] = content
+
+            for video in item.get('videoSet', []):
+                auth_token = video.get('authToken')
+                if not auth_token:
+                    continue
+                funimation_id = video.get('FUNImationID') or video.get('videoId')
+                preference = 1 if video.get('languageMode') == 'dub' else 0
+                if not auth_token.startswith('?'):
+                    auth_token = '?%s' % auth_token
+                for quality, height in (('sd', 480), ('hd', 720), ('hd1080', 1080)):
+                    format_url = video.get('%sUrl' % quality)
+                    if not format_url:
+                        continue
+                    if not format_url.startswith(('http', '//')):
+                        errors.append(format_url)
+                        continue
+                    if determine_ext(format_url) == 'm3u8':
+                        m3u8_formats = self._extract_m3u8_formats(
+                            format_url + auth_token, display_id, 'mp4', entry_protocol='m3u8_native',
+                            preference=preference, m3u8_id='%s-hls' % funimation_id, fatal=False)
+                        if m3u8_formats:
+                            formats.extend(m3u8_formats)
+                    else:
+                        tbr = int_or_none(self._search_regex(
+                            r'-(\d+)[Kk]', format_url, 'tbr', default=None))
+                        formats.append({
+                            'url': format_url + auth_token,
+                            'format_id': '%s-http-%dp' % (funimation_id, height),
+                            'height': height,
+                            'tbr': tbr,
+                            'preference': preference,
+                        })
+
+        if not formats and errors:
+            raise ExtractorError(
+                '%s returned error: %s'
+                % (self.IE_NAME, clean_html(error_messages.get(errors[0], errors[0]))),
+                expected=True)
+
+        self._sort_formats(formats)
+
+        title = item['title']
+        artist = item.get('artist')
+        if artist:
+            title = '%s - %s' % (artist, title)
+        description = self._og_search_description(webpage) or item.get('description')
+        thumbnail = self._og_search_thumbnail(webpage) or item.get('posterUrl')
+        video_id = item.get('itemId') or display_id
+
+        return {
+            'id': video_id,
+            'display_id': display_id,
+            'title': title,
+            'description': description,
+            'thumbnail': thumbnail,
+            'formats': formats,
+        }
index 35067e2712ad89fe107b0f87a94ce29724f9614c..8603fd692d0f7b46b6a3150045b0d0148420d7b5 100644 (file)
@@ -27,6 +27,7 @@ class OoyalaBaseIE(InfoExtractor):
             'duration': float_or_none(metadata.get('duration'), 1000),
         }
 
+        urls = []
         formats = []
         for supported_format in ('mp4', 'm3u8', 'hds', 'rtmp'):
             auth_data = self._download_json(
@@ -38,20 +39,28 @@ class OoyalaBaseIE(InfoExtractor):
             if cur_auth_data['authorized']:
                 for stream in cur_auth_data['streams']:
                     url = base64.b64decode(stream['url']['data'].encode('ascii')).decode('utf-8')
+                    if url in urls:
+                        continue
+                    urls.append(url)
                     delivery_type = stream['delivery_type']
-                    if delivery_type == 'remote_asset':
-                        video_info['url'] = url
-                        return video_info
-                    if delivery_type == 'hls':
-                        formats.extend(self._extract_m3u8_formats(url, embed_code, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False))
-                    elif delivery_type == 'hds':
-                        formats.extend(self._extract_f4m_formats(url, embed_code, -1, 'hds', fatal=False))
+                    if delivery_type == 'hls' or '.m3u8' in url:
+                        m3u8_formats = self._extract_m3u8_formats(url, embed_code, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)
+                        if m3u8_formats:
+                            formats.extend(m3u8_formats)
+                    elif delivery_type == 'hds' or '.f4m' in url:
+                        f4m_formats = self._extract_f4m_formats(url, embed_code, f4m_id='hds', fatal=False)
+                        if f4m_formats:
+                            formats.extend(f4m_formats)
+                    elif '.smil' in url:
+                        smil_formats = self._extract_smil_formats(url, embed_code, fatal=False)
+                        if smil_formats:
+                            formats.extend(smil_formats)
                     else:
                         formats.append({
                             'url': url,
                             'ext': stream.get('delivery_type'),
                             'vcodec': stream.get('video_codec'),
-                            'format_id': '%s-%s-%sp' % (stream.get('profile'), delivery_type, stream.get('height')),
+                            'format_id': delivery_type,
                             'width': int_or_none(stream.get('width')),
                             'height': int_or_none(stream.get('height')),
                             'abr': int_or_none(stream.get('audio_bitrate')),
index d71d7eb7611f915862b1505849a9b4971b89c939..604a0dd222a175a762a56735b2244b7391485c3e 100644 (file)
@@ -16,164 +16,165 @@ from ..utils import (
 
 class PBSIE(InfoExtractor):
     _STATIONS = (
-        ('aptv.org', 'APT - Alabama Public Television (WBIQ)'),  # http://aptv.org/
-        ('gpb.org', 'GPB/Georgia Public Broadcasting (WGTV)'),  # http://www.gpb.org/
-        ('mpbonline.org', 'Mississippi Public Broadcasting (WMPN)'),  # http://www.mpbonline.org
-        ('wnpt.org', 'Nashville Public Television (WNPT)'),  # http://www.wnpt.org
-        ('wfsu.org', 'WFSU-TV (WFSU)'),  # http://wfsu.org/
-        ('wsre.org', 'WSRE (WSRE)'),  # http://www.wsre.org
-        ('wtcitv.org', 'WTCI (WTCI)'),  # http://www.wtcitv.org
-        ('pba.org', 'WPBA/Channel 30 (WPBA)'),  # http://pba.org/
-        ('alaskapublic.org', 'Alaska Public Media (KAKM)'),  # http://alaskapublic.org/kakm
-        ('kuac.org', 'KUAC (KUAC)'),  # http://kuac.org/kuac-tv/
-        ('ktoo.org', '360 North (KTOO)'),  # http://www.ktoo.org/
-        ('azpm.org', 'KUAT 6 (KUAT)'),  # http://www.azpm.org/
-        ('azpbs.org', 'Arizona PBS (KAET)'),  # http://www.azpbs.org
-        ('newmexicopbs.org', 'KNME-TV/Channel 5 (KNME)'),  # http://www.newmexicopbs.org/
-        ('vegaspbs.org', 'Vegas PBS (KLVX)'),  # http://vegaspbs.org/
-        ('aetn.org', 'AETN/ARKANSAS ETV NETWORK (KETS)'),  # http://www.aetn.org/
-        ('ket.org', 'KET (WKLE)'),  # http://www.ket.org/
-        ('wkno.org', 'WKNO/Channel 10 (WKNO)'),  # http://www.wkno.org/
-        ('lpb.org', 'LPB/LOUISIANA PUBLIC BROADCASTING (WLPB)'),  # http://www.lpb.org/
-        ('oeta.tv', 'OETA (KETA)'),  # http://www.oeta.tv
-        ('optv.org', 'Ozarks Public Television (KOZK)'),  # http://www.optv.org/
-        ('wsiu.org', 'WSIU Public Broadcasting (WSIU)'),  # http://www.wsiu.org/
-        ('keet.org', 'KEET TV (KEET)'),  # http://www.keet.org
-        ('kixe.org', 'KIXE/Channel 9 (KIXE)'),  # http://kixe.org/
-        ('kpbs.org', 'KPBS San Diego (KPBS)'),  # http://www.kpbs.org/
-        ('kqed.org', 'KQED (KQED)'),  # http://www.kqed.org
-        ('kvie.org', 'KVIE Public Television (KVIE)'),  # http://www.kvie.org
-        ('pbssocal.org', 'PBS SoCal/KOCE (KOCE)'),  # http://www.pbssocal.org/
-        ('valleypbs.org', 'ValleyPBS (KVPT)'),  # http://www.valleypbs.org/
-        ('cptv.org', 'CONNECTICUT PUBLIC TELEVISION (WEDH)'),  # http://cptv.org
-        ('knpb.org', 'KNPB Channel 5 (KNPB)'),  # http://www.knpb.org/
-        ('soptv.org', 'SOPTV (KSYS)'),  # http://www.soptv.org
-        ('klcs.org', 'KLCS/Channel 58 (KLCS)'),  # http://www.klcs.org
-        ('krcb.org', 'KRCB Television & Radio (KRCB)'),  # http://www.krcb.org
-        ('kvcr.org', 'KVCR TV/DT/FM :: Vision for the Future (KVCR)'),  # http://kvcr.org
-        ('rmpbs.org', 'Rocky Mountain PBS (KRMA)'),  # http://www.rmpbs.org
-        ('kenw.org', 'KENW-TV3 (KENW)'),  # http://www.kenw.org
-        ('kued.org', 'KUED Channel 7 (KUED)'),  # http://www.kued.org
-        ('wyomingpbs.org', 'Wyoming PBS (KCWC)'),  # http://www.wyomingpbs.org
-        ('cpt12.org', 'Colorado Public Television / KBDI 12 (KBDI)'),  # http://www.cpt12.org/
-        ('kbyutv.org', 'KBYU-TV (KBYU)'),  # http://www.kbyutv.org/
-        ('thirteen.org', 'Thirteen/WNET New York (WNET)'),  # http://www.thirteen.org
-        ('wgbh.org', 'WGBH/Channel 2 (WGBH)'),  # http://wgbh.org
-        ('wgby.org', 'WGBY (WGBY)'),  # http://www.wgby.org
-        ('njtvonline.org', 'NJTV Public Media NJ (WNJT)'),  # http://www.njtvonline.org/
-        ('ripbs.org', 'Rhode Island PBS (WSBE)'),  # http://www.ripbs.org/home/
-        ('wliw.org', 'WLIW21 (WLIW)'),  # http://www.wliw.org/
-        ('mpt.org', 'mpt/Maryland Public Television (WMPB)'),  # http://www.mpt.org
-        ('weta.org', 'WETA Television and Radio (WETA)'),  # http://www.weta.org
-        ('whyy.org', 'WHYY (WHYY)'),  # http://www.whyy.org
-        ('wlvt.org', 'PBS 39 (WLVT)'),  # http://www.wlvt.org/
-        ('wvpt.net', 'WVPT - Your Source for PBS and More! (WVPT)'),  # http://www.wvpt.net
-        ('whut.org', 'Howard University Television (WHUT)'),  # http://www.whut.org
-        ('wedu.org', 'WEDU PBS (WEDU)'),  # http://www.wedu.org
-        ('wgcu.org', 'WGCU Public Media (WGCU)'),  # http://www.wgcu.org/
-        ('wjct.org', 'WJCT Public Broadcasting (WJCT)'),  # http://www.wjct.org
-        ('wpbt2.org', 'WPBT2 (WPBT)'),  # http://www.wpbt2.org
-        ('wucftv.org', 'WUCF TV (WUCF)'),  # http://wucftv.org
-        ('wuft.org', 'WUFT/Channel 5 (WUFT)'),  # http://www.wuft.org
-        ('wxel.org', 'WXEL/Channel 42 (WXEL)'),  # http://www.wxel.org/home/
-        ('wlrn.org', 'WLRN/Channel 17 (WLRN)'),  # http://www.wlrn.org/
-        ('wusf.org', 'WUSF Public Broadcasting (WUSF)'),  # http://wusf.org/
-        ('scetv.org', 'ETV (WRLK)'),  # http://www.scetv.org
-        ('unctv.org', 'UNC-TV (WUNC)'),  # http://www.unctv.org/
-        ('pbsguam.org', 'PBS Guam (KGTF)'),  # http://www.pbsguam.org/
-        ('pbshawaii.org', 'PBS Hawaii - Oceanic Cable Channel 10 (KHET)'),  # http://www.pbshawaii.org/
-        ('idahoptv.org', 'Idaho Public Television (KAID)'),  # http://idahoptv.org
-        ('ksps.org', 'KSPS (KSPS)'),  # http://www.ksps.org/home/
-        ('opb.org', 'OPB (KOPB)'),  # http://www.opb.org
-        ('kwsu.org', 'KWSU/Channel 10 & KTNW/Channel 31 (KWSU)'),  # http://www.kwsu.org
-        ('illinois.edu', 'WILL-TV (WILL)'),  # http://will.illinois.edu/
-        ('wsec.tv', 'Network Knowledge - WSEC/Springfield (WSEC)'),  # http://www.wsec.tv
-        ('wttw.com', 'WTTW11 (WTTW)'),  # http://www.wttw.com/
-        ('wtvp.org', 'WTVP & WTVP.org, Public Media for Central Illinois (WTVP)'),  # http://www.wtvp.org/
-        ('iptv.org', 'Iowa Public Television/IPTV (KDIN)'),  # http://www.iptv.org/
-        ('ninenet.org', 'Nine Network (KETC)'),  # http://www.ninenet.org
-        ('wfwa.org', 'PBS39 Fort Wayne (WFWA)'),  # http://wfwa.org/
-        ('wfyi.org', 'WFYI Indianapolis (WFYI)'),  # http://www.wfyi.org
-        ('mptv.org', 'Milwaukee Public Television (WMVS)'),  # http://www.mptv.org
-        ('wnin.org', 'WNIN (WNIN)'),  # http://www.wnin.org/
-        ('wnit.org', 'WNIT Public Television (WNIT)'),  # http://www.wnit.org/
-        ('wpt.org', 'WPT (WPNE)'),  # http://www.wpt.org/
-        ('wvut.org', 'WVUT/Channel 22 (WVUT)'),  # http://wvut.org/
-        ('weiu.net', 'WEIU/Channel 51 (WEIU)'),  # http://www.weiu.net
-        ('wqpt.org', 'WQPT-TV (WQPT)'),  # http://www.wqpt.org
-        ('wycc.org', 'WYCC PBS Chicago (WYCC)'),  # http://www.wycc.org
-        ('lakeshorepublicmedia.org', 'Lakeshore Public Television (WYIN)'),  # http://lakeshorepublicmedia.org/
-        ('wipb.org', 'WIPB-TV (WIPB)'),  # http://wipb.org
-        ('indianapublicmedia.org', 'WTIU (WTIU)'),  # http://indianapublicmedia.org/tv/
-        ('cetconnect.org', 'CET  (WCET)'),  # http://www.cetconnect.org
-        ('thinktv.org', 'ThinkTVNetwork (WPTD)'),  # http://www.thinktv.org
-        ('wbgu.org', 'WBGU-TV (WBGU)'),  # http://wbgu.org
-        ('wgvu.org', 'WGVU TV (WGVU)'),  # http://www.wgvu.org/
-        ('netnebraska.org', 'NET1 (KUON)'),  # http://netnebraska.org
-        ('pioneer.org', 'Pioneer Public Television (KWCM)'),  # http://www.pioneer.org
-        ('sdpb.org', 'SDPB Television (KUSD)'),  # http://www.sdpb.org
-        ('tpt.org', 'TPT (KTCA)'),  # http://www.tpt.org
-        ('ksmq.org', 'KSMQ (KSMQ)'),  # http://www.ksmq.org/
-        ('kpts.org', 'KPTS/Channel 8 (KPTS)'),  # http://www.kpts.org/
-        ('ktwu.org', 'KTWU/Channel 11 (KTWU)'),  # http://ktwu.org
-        ('shptv.org', 'Smoky Hills Public Television (KOOD)'),  # http://www.shptv.org
-        ('kcpt.org', 'KCPT Kansas City Public Television (KCPT)'),  # http://kcpt.org/
-        ('blueridgepbs.org', 'Blue Ridge PBS (WBRA)'),  # http://www.blueridgepbs.org/
-        ('easttennesseepbs.org', 'East Tennessee PBS (WSJK)'),  # http://easttennesseepbs.org
-        ('wcte.org', 'WCTE-TV (WCTE)'),  # http://www.wcte.org
-        ('wljt.org', 'WLJT, Channel 11 (WLJT)'),  # http://wljt.org/
-        ('wosu.org', 'WOSU TV (WOSU)'),  # http://wosu.org/
-        ('woub.org', 'WOUB/WOUC (WOUB)'),  # http://woub.org/tv/index.php?section=5
-        ('wvpublic.org', 'WVPB (WVPB)'),  # http://wvpublic.org/
-        ('wkyupbs.org', 'WKYU-PBS (WKYU)'),  # http://www.wkyupbs.org
-        ('wyes.org', 'WYES-TV/New Orleans (WYES)'),  # http://www.wyes.org
-        ('kera.org', 'KERA 13 (KERA)'),  # http://www.kera.org/
-        ('mpbn.net', 'MPBN (WCBB)'),  # http://www.mpbn.net/
-        ('mountainlake.org', 'Mountain Lake PBS (WCFE)'),  # http://www.mountainlake.org/
-        ('nhptv.org', 'NHPTV (WENH)'),  # http://nhptv.org/
-        ('vpt.org', 'Vermont PBS (WETK)'),  # http://www.vpt.org
-        ('witf.org', 'witf (WITF)'),  # http://www.witf.org
-        ('wqed.org', 'WQED Multimedia (WQED)'),  # http://www.wqed.org/
-        ('wmht.org', 'WMHT Educational Telecommunications (WMHT)'),  # http://www.wmht.org/home/
-        ('deltabroadcasting.org', 'Q-TV (WDCQ)'),  # http://www.deltabroadcasting.org
-        ('dptv.org', 'WTVS Detroit Public TV (WTVS)'),  # http://www.dptv.org/
-        ('wcmu.org', 'CMU Public Television (WCMU)'),  # http://www.wcmu.org
-        ('wkar.org', 'WKAR-TV (WKAR)'),  # http://wkar.org/
-        ('nmu.edu', 'WNMU-TV Public TV 13 (WNMU)'),  # http://wnmutv.nmu.edu
-        ('wdse.org', 'WDSE - WRPT (WDSE)'),  # http://www.wdse.org/
-        ('wgte.org', 'WGTE TV (WGTE)'),  # http://www.wgte.org
-        ('lakelandptv.org', 'Lakeland Public Television (KAWE)'),  # http://www.lakelandptv.org
-        ('prairiepublic.org', 'PRAIRIE PUBLIC (KFME)'),  # http://www.prairiepublic.org/
-        ('kmos.org', 'KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS)'),  # http://www.kmos.org/
-        ('montanapbs.org', 'MontanaPBS (KUSM)'),  # http://montanapbs.org
-        ('krwg.org', 'KRWG/Channel 22 (KRWG)'),  # http://www.krwg.org
-        ('panhandlepbs.org', 'KACV (KACV)'),  # http://www.panhandlepbs.org/home/
-        ('kcostv.org', 'KCOS/Channel 13 (KCOS)'),  # www.kcostv.org
-        ('wcny.org', 'WCNY/Channel 24 (WCNY)'),  # http://www.wcny.org
-        ('wned.org', 'WNED (WNED)'),  # http://www.wned.org/
-        ('wpbstv.org', 'WPBS (WPBS)'),  # http://www.wpbstv.org
-        ('wskg.org', 'WSKG Public TV (WSKG)'),  # http://wskg.org
-        ('wxxi.org', 'WXXI (WXXI)'),  # http://wxxi.org
-        ('wpsu.org', 'WPSU (WPSU)'),  # http://www.wpsu.org
-        ('wqln.org', 'WQLN/Channel 54 (WQLN)'),  # http://www.wqln.org
-        ('wvia.org', 'WVIA Public Media Studios (WVIA)'),  # http://www.wvia.org/
-        ('wtvi.org', 'WTVI (WTVI)'),  # http://www.wtvi.org/
-        ('whro.org', 'WHRO (WHRO)'),  # http://whro.org
-        ('westernreservepublicmedia.org', 'Western Reserve PBS (WNEO)'),  # http://www.WesternReservePublicMedia.org/
-        ('wviz.org', 'WVIZ/PBS ideastream (WVIZ)'),  # http://www.wviz.org/
-        ('kcts9.org', 'KCTS 9 (KCTS)'),  # http://kcts9.org/
-        ('basinpbs.org', 'Basin PBS (KPBT)'),  # http://www.basinpbs.org
-        ('houstonpublicmedia.org', 'KUHT / Channel 8 (KUHT)'),  # http://www.houstonpublicmedia.org/
-        ('tamu.edu', 'KAMU - TV (KAMU)'),  # http://KAMU.tamu.edu
-        ('kedt.org', 'KEDT/Channel 16 (KEDT)'),  # http://www.kedt.org
-        ('klrn.org', 'KLRN (KLRN)'),  # http://www.klrn.org
-        ('klru.org', 'KLRU (KLRU)'),  # http://www.klru.org
-        ('kmbh.org', 'KMBH-TV (KMBH)'),  # http://www.kmbh.org
-        ('knct.org', 'KNCT (KNCT)'),  # http://www.knct.org
-        ('ktxt.org', 'KTTZ-TV (KTXT)'),  # http://www.ktxt.org
-        ('wtjx.org', 'WTJX Channel 12 (WTJX)'),  # http://www.wtjx.org/
-        ('ideastations.org', 'WCVE PBS (WCVE)'),  # http://ideastations.org/
-        ('kbtc.org', 'KBTC Public Television (KBTC)'),  # http://kbtc.org
+        ('video.pbs.org', 'PBS: Public Broadcasting Service'),  # http://www.pbs.org/
+        ('video.aptv.org', 'APT - Alabama Public Television (WBIQ)'),  # http://aptv.org/
+        ('video.gpb.org', 'GPB/Georgia Public Broadcasting (WGTV)'),  # http://www.gpb.org/
+        ('video.mpbonline.org', 'Mississippi Public Broadcasting (WMPN)'),  # http://www.mpbonline.org
+        ('video.wnpt.org', 'Nashville Public Television (WNPT)'),  # http://www.wnpt.org
+        ('video.wfsu.org', 'WFSU-TV (WFSU)'),  # http://wfsu.org/
+        ('video.wsre.org', 'WSRE (WSRE)'),  # http://www.wsre.org
+        ('video.wtcitv.org', 'WTCI (WTCI)'),  # http://www.wtcitv.org
+        ('video.pba.org', 'WPBA/Channel 30 (WPBA)'),  # http://pba.org/
+        ('video.alaskapublic.org', 'Alaska Public Media (KAKM)'),  # http://alaskapublic.org/kakm
+        # ('kuac.org', 'KUAC (KUAC)'),  # http://kuac.org/kuac-tv/
+        # ('ktoo.org', '360 North (KTOO)'),  # http://www.ktoo.org/
+        # ('azpm.org', 'KUAT 6 (KUAT)'),  # http://www.azpm.org/
+        ('video.azpbs.org', 'Arizona PBS (KAET)'),  # http://www.azpbs.org
+        ('portal.knme.org', 'KNME-TV/Channel 5 (KNME)'),  # http://www.newmexicopbs.org/
+        ('video.vegaspbs.org', 'Vegas PBS (KLVX)'),  # http://vegaspbs.org/
+        ('watch.aetn.org', 'AETN/ARKANSAS ETV NETWORK (KETS)'),  # http://www.aetn.org/
+        ('video.ket.org', 'KET (WKLE)'),  # http://www.ket.org/
+        ('video.wkno.org', 'WKNO/Channel 10 (WKNO)'),  # http://www.wkno.org/
+        ('video.lpb.org', 'LPB/LOUISIANA PUBLIC BROADCASTING (WLPB)'),  # http://www.lpb.org/
+        ('videos.oeta.tv', 'OETA (KETA)'),  # http://www.oeta.tv
+        ('video.optv.org', 'Ozarks Public Television (KOZK)'),  # http://www.optv.org/
+        ('watch.wsiu.org', 'WSIU Public Broadcasting (WSIU)'),  # http://www.wsiu.org/
+        ('video.keet.org', 'KEET TV (KEET)'),  # http://www.keet.org
+        ('pbs.kixe.org', 'KIXE/Channel 9 (KIXE)'),  # http://kixe.org/
+        ('video.kpbs.org', 'KPBS San Diego (KPBS)'),  # http://www.kpbs.org/
+        ('video.kqed.org', 'KQED (KQED)'),  # http://www.kqed.org
+        ('vids.kvie.org', 'KVIE Public Television (KVIE)'),  # http://www.kvie.org
+        ('video.pbssocal.org', 'PBS SoCal/KOCE (KOCE)'),  # http://www.pbssocal.org/
+        ('video.valleypbs.org', 'ValleyPBS (KVPT)'),  # http://www.valleypbs.org/
+        ('video.cptv.org', 'CONNECTICUT PUBLIC TELEVISION (WEDH)'),  # http://cptv.org
+        ('watch.knpb.org', 'KNPB Channel 5 (KNPB)'),  # http://www.knpb.org/
+        ('video.soptv.org', 'SOPTV (KSYS)'),  # http://www.soptv.org
+        # ('klcs.org', 'KLCS/Channel 58 (KLCS)'),  # http://www.klcs.org
+        # ('krcb.org', 'KRCB Television & Radio (KRCB)'),  # http://www.krcb.org
+        # ('kvcr.org', 'KVCR TV/DT/FM :: Vision for the Future (KVCR)'),  # http://kvcr.org
+        ('video.rmpbs.org', 'Rocky Mountain PBS (KRMA)'),  # http://www.rmpbs.org
+        ('video.kenw.org', 'KENW-TV3 (KENW)'),  # http://www.kenw.org
+        ('video.kued.org', 'KUED Channel 7 (KUED)'),  # http://www.kued.org
+        ('video.wyomingpbs.org', 'Wyoming PBS (KCWC)'),  # http://www.wyomingpbs.org
+        ('video.cpt12.org', 'Colorado Public Television / KBDI 12 (KBDI)'),  # http://www.cpt12.org/
+        ('video.kbyueleven.org', 'KBYU-TV (KBYU)'),  # http://www.kbyutv.org/
+        ('video.thirteen.org', 'Thirteen/WNET New York (WNET)'),  # http://www.thirteen.org
+        ('video.wgbh.org', 'WGBH/Channel 2 (WGBH)'),  # http://wgbh.org
+        ('video.wgby.org', 'WGBY (WGBY)'),  # http://www.wgby.org
+        ('watch.njtvonline.org', 'NJTV Public Media NJ (WNJT)'),  # http://www.njtvonline.org/
+        # ('ripbs.org', 'Rhode Island PBS (WSBE)'),  # http://www.ripbs.org/home/
+        ('watch.wliw.org', 'WLIW21 (WLIW)'),  # http://www.wliw.org/
+        ('video.mpt.tv', 'mpt/Maryland Public Television (WMPB)'),  # http://www.mpt.org
+        ('watch.weta.org', 'WETA Television and Radio (WETA)'),  # http://www.weta.org
+        ('video.whyy.org', 'WHYY (WHYY)'),  # http://www.whyy.org
+        ('video.wlvt.org', 'PBS 39 (WLVT)'),  # http://www.wlvt.org/
+        ('video.wvpt.net', 'WVPT - Your Source for PBS and More! (WVPT)'),  # http://www.wvpt.net
+        ('video.whut.org', 'Howard University Television (WHUT)'),  # http://www.whut.org
+        ('video.wedu.org', 'WEDU PBS (WEDU)'),  # http://www.wedu.org
+        ('video.wgcu.org', 'WGCU Public Media (WGCU)'),  # http://www.wgcu.org/
+        # ('wjct.org', 'WJCT Public Broadcasting (WJCT)'),  # http://www.wjct.org
+        ('video.wpbt2.org', 'WPBT2 (WPBT)'),  # http://www.wpbt2.org
+        ('video.wucftv.org', 'WUCF TV (WUCF)'),  # http://wucftv.org
+        ('video.wuft.org', 'WUFT/Channel 5 (WUFT)'),  # http://www.wuft.org
+        ('watch.wxel.org', 'WXEL/Channel 42 (WXEL)'),  # http://www.wxel.org/home/
+        ('video.wlrn.org', 'WLRN/Channel 17 (WLRN)'),  # http://www.wlrn.org/
+        ('video.wusf.usf.edu', 'WUSF Public Broadcasting (WUSF)'),  # http://wusf.org/
+        ('video.scetv.org', 'ETV (WRLK)'),  # http://www.scetv.org
+        ('video.unctv.org', 'UNC-TV (WUNC)'),  # http://www.unctv.org/
+        # ('pbsguam.org', 'PBS Guam (KGTF)'),  # http://www.pbsguam.org/
+        ('video.pbshawaii.org', 'PBS Hawaii - Oceanic Cable Channel 10 (KHET)'),  # http://www.pbshawaii.org/
+        ('video.idahoptv.org', 'Idaho Public Television (KAID)'),  # http://idahoptv.org
+        ('video.ksps.org', 'KSPS (KSPS)'),  # http://www.ksps.org/home/
+        ('watch.opb.org', 'OPB (KOPB)'),  # http://www.opb.org
+        ('watch.nwptv.org', 'KWSU/Channel 10 & KTNW/Channel 31 (KWSU)'),  # http://www.kwsu.org
+        ('video.will.illinois.edu', 'WILL-TV (WILL)'),  # http://will.illinois.edu/
+        ('video.networkknowledge.tv', 'Network Knowledge - WSEC/Springfield (WSEC)'),  # http://www.wsec.tv
+        ('video.wttw.com', 'WTTW11 (WTTW)'),  # http://www.wttw.com/
+        # ('wtvp.org', 'WTVP & WTVP.org, Public Media for Central Illinois (WTVP)'),  # http://www.wtvp.org/
+        ('video.iptv.org', 'Iowa Public Television/IPTV (KDIN)'),  # http://www.iptv.org/
+        ('video.ninenet.org', 'Nine Network (KETC)'),  # http://www.ninenet.org
+        ('video.wfwa.org', 'PBS39 Fort Wayne (WFWA)'),  # http://wfwa.org/
+        ('video.wfyi.org', 'WFYI Indianapolis (WFYI)'),  # http://www.wfyi.org
+        ('video.mptv.org', 'Milwaukee Public Television (WMVS)'),  # http://www.mptv.org
+        ('video.wnin.org', 'WNIN (WNIN)'),  # http://www.wnin.org/
+        ('video.wnit.org', 'WNIT Public Television (WNIT)'),  # http://www.wnit.org/
+        ('video.wpt.org', 'WPT (WPNE)'),  # http://www.wpt.org/
+        ('video.wvut.org', 'WVUT/Channel 22 (WVUT)'),  # http://wvut.org/
+        ('video.weiu.net', 'WEIU/Channel 51 (WEIU)'),  # http://www.weiu.net
+        ('video.wqpt.org', 'WQPT-TV (WQPT)'),  # http://www.wqpt.org
+        ('video.wycc.org', 'WYCC PBS Chicago (WYCC)'),  # http://www.wycc.org
+        # ('lakeshorepublicmedia.org', 'Lakeshore Public Television (WYIN)'),  # http://lakeshorepublicmedia.org/
+        ('video.wipb.org', 'WIPB-TV (WIPB)'),  # http://wipb.org
+        ('video.indianapublicmedia.org', 'WTIU (WTIU)'),  # http://indianapublicmedia.org/tv/
+        ('watch.cetconnect.org', 'CET  (WCET)'),  # http://www.cetconnect.org
+        ('video.thinktv.org', 'ThinkTVNetwork (WPTD)'),  # http://www.thinktv.org
+        ('video.wbgu.org', 'WBGU-TV (WBGU)'),  # http://wbgu.org
+        ('video.wgvu.org', 'WGVU TV (WGVU)'),  # http://www.wgvu.org/
+        ('video.netnebraska.org', 'NET1 (KUON)'),  # http://netnebraska.org
+        ('video.pioneer.org', 'Pioneer Public Television (KWCM)'),  # http://www.pioneer.org
+        ('watch.sdpb.org', 'SDPB Television (KUSD)'),  # http://www.sdpb.org
+        ('video.tpt.org', 'TPT (KTCA)'),  # http://www.tpt.org
+        ('watch.ksmq.org', 'KSMQ (KSMQ)'),  # http://www.ksmq.org/
+        ('watch.kpts.org', 'KPTS/Channel 8 (KPTS)'),  # http://www.kpts.org/
+        ('watch.ktwu.org', 'KTWU/Channel 11 (KTWU)'),  # http://ktwu.org
+        # ('shptv.org', 'Smoky Hills Public Television (KOOD)'),  # http://www.shptv.org
+        # ('kcpt.org', 'KCPT Kansas City Public Television (KCPT)'),  # http://kcpt.org/
+        # ('blueridgepbs.org', 'Blue Ridge PBS (WBRA)'),  # http://www.blueridgepbs.org/
+        ('watch.easttennesseepbs.org', 'East Tennessee PBS (WSJK)'),  # http://easttennesseepbs.org
+        ('video.wcte.tv', 'WCTE-TV (WCTE)'),  # http://www.wcte.org
+        ('video.wljt.org', 'WLJT, Channel 11 (WLJT)'),  # http://wljt.org/
+        ('video.wosu.org', 'WOSU TV (WOSU)'),  # http://wosu.org/
+        ('video.woub.org', 'WOUB/WOUC (WOUB)'),  # http://woub.org/tv/index.php?section=5
+        ('video.wvpublic.org', 'WVPB (WVPB)'),  # http://wvpublic.org/
+        ('video.wkyupbs.org', 'WKYU-PBS (WKYU)'),  # http://www.wkyupbs.org
+        # ('wyes.org', 'WYES-TV/New Orleans (WYES)'),  # http://www.wyes.org
+        ('video.kera.org', 'KERA 13 (KERA)'),  # http://www.kera.org/
+        ('video.mpbn.net', 'MPBN (WCBB)'),  # http://www.mpbn.net/
+        ('video.mountainlake.org', 'Mountain Lake PBS (WCFE)'),  # http://www.mountainlake.org/
+        ('video.nhptv.org', 'NHPTV (WENH)'),  # http://nhptv.org/
+        ('video.vpt.org', 'Vermont PBS (WETK)'),  # http://www.vpt.org
+        ('video.witf.org', 'witf (WITF)'),  # http://www.witf.org
+        ('watch.wqed.org', 'WQED Multimedia (WQED)'),  # http://www.wqed.org/
+        ('video.wmht.org', 'WMHT Educational Telecommunications (WMHT)'),  # http://www.wmht.org/home/
+        ('video.deltabroadcasting.org', 'Q-TV (WDCQ)'),  # http://www.deltabroadcasting.org
+        ('video.dptv.org', 'WTVS Detroit Public TV (WTVS)'),  # http://www.dptv.org/
+        ('video.wcmu.org', 'CMU Public Television (WCMU)'),  # http://www.wcmu.org
+        ('video.wkar.org', 'WKAR-TV (WKAR)'),  # http://wkar.org/
+        ('wnmuvideo.nmu.edu', 'WNMU-TV Public TV 13 (WNMU)'),  # http://wnmutv.nmu.edu
+        ('video.wdse.org', 'WDSE - WRPT (WDSE)'),  # http://www.wdse.org/
+        ('video.wgte.org', 'WGTE TV (WGTE)'),  # http://www.wgte.org
+        ('video.lptv.org', 'Lakeland Public Television (KAWE)'),  # http://www.lakelandptv.org
+        # ('prairiepublic.org', 'PRAIRIE PUBLIC (KFME)'),  # http://www.prairiepublic.org/
+        ('video.kmos.org', 'KMOS-TV - Channels 6.1, 6.2 and 6.3 (KMOS)'),  # http://www.kmos.org/
+        ('watch.montanapbs.org', 'MontanaPBS (KUSM)'),  # http://montanapbs.org
+        ('video.krwg.org', 'KRWG/Channel 22 (KRWG)'),  # http://www.krwg.org
+        ('video.kacvtv.org', 'KACV (KACV)'),  # http://www.panhandlepbs.org/home/
+        ('video.kcostv.org', 'KCOS/Channel 13 (KCOS)'),  # www.kcostv.org
+        ('video.wcny.org', 'WCNY/Channel 24 (WCNY)'),  # http://www.wcny.org
+        ('video.wned.org', 'WNED (WNED)'),  # http://www.wned.org/
+        ('watch.wpbstv.org', 'WPBS (WPBS)'),  # http://www.wpbstv.org
+        ('video.wskg.org', 'WSKG Public TV (WSKG)'),  # http://wskg.org
+        ('video.wxxi.org', 'WXXI (WXXI)'),  # http://wxxi.org
+        ('video.wpsu.org', 'WPSU (WPSU)'),  # http://www.wpsu.org
+        # ('wqln.org', 'WQLN/Channel 54 (WQLN)'),  # http://www.wqln.org
+        ('on-demand.wvia.org', 'WVIA Public Media Studios (WVIA)'),  # http://www.wvia.org/
+        ('video.wtvi.org', 'WTVI (WTVI)'),  # http://www.wtvi.org/
+        # ('whro.org', 'WHRO (WHRO)'),  # http://whro.org
+        ('video.westernreservepublicmedia.org', 'Western Reserve PBS (WNEO)'),  # http://www.WesternReservePublicMedia.org/
+        ('video.ideastream.org', 'WVIZ/PBS ideastream (WVIZ)'),  # http://www.wviz.org/
+        ('video.kcts9.org', 'KCTS 9 (KCTS)'),  # http://kcts9.org/
+        ('video.basinpbs.org', 'Basin PBS (KPBT)'),  # http://www.basinpbs.org
+        ('video.houstonpbs.org', 'KUHT / Channel 8 (KUHT)'),  # http://www.houstonpublicmedia.org/
+        # ('tamu.edu', 'KAMU - TV (KAMU)'),  # http://KAMU.tamu.edu
+        # ('kedt.org', 'KEDT/Channel 16 (KEDT)'),  # http://www.kedt.org
+        ('video.klrn.org', 'KLRN (KLRN)'),  # http://www.klrn.org
+        ('video.klru.tv', 'KLRU (KLRU)'),  # http://www.klru.org
+        # ('kmbh.org', 'KMBH-TV (KMBH)'),  # http://www.kmbh.org
+        # ('knct.org', 'KNCT (KNCT)'),  # http://www.knct.org
+        # ('ktxt.org', 'KTTZ-TV (KTXT)'),  # http://www.ktxt.org
+        ('video.wtjx.org', 'WTJX Channel 12 (WTJX)'),  # http://www.wtjx.org/
+        ('video.ideastations.org', 'WCVE PBS (WCVE)'),  # http://ideastations.org/
+        ('video.kbtc.org', 'KBTC Public Television (KBTC)'),  # http://kbtc.org
     )
 
     IE_NAME = 'pbs'
@@ -182,13 +183,13 @@ class PBSIE(InfoExtractor):
     _VALID_URL = r'''(?x)https?://
         (?:
            # Direct video URL
-           (?:videos?|watch)\.(?:%s)/(?:viralplayer|video)/(?P<id>[0-9]+)/? |
+           (?:%s)/(?:viralplayer|video)/(?P<id>[0-9]+)/? |
            # Article with embedded player (or direct video)
            (?:www\.)?pbs\.org/(?:[^/]+/){2,5}(?P<presumptive_id>[^/]+?)(?:\.html)?/?(?:$|[?\#]) |
            # Player
            (?:video|player)\.pbs\.org/(?:widget/)?partnerplayer/(?P<player_id>[^/]+)/
         )
-    ''' % '|'.join(list(zip(*_STATIONS))[0])
+    ''' % '|'.join(re.escape(p) for p in list(zip(*_STATIONS))[0])
 
     _TESTS = [
         {
index 91970426103c0384a4998407443907182d7976b5..7de7b7273523ea8a43a6d22e8ab684afb4fc5875 100644 (file)
@@ -6,12 +6,12 @@ import re
 from .common import InfoExtractor
 from .brightcove import BrightcoveLegacyIE
 
-from ..compat import compat_urllib_parse
 from ..utils import (
     ExtractorError,
     sanitized_Request,
     smuggle_url,
     std_headers,
+    urlencode_postdata,
 )
 
 
@@ -57,7 +57,7 @@ class SafariBaseIE(InfoExtractor):
         }
 
         request = sanitized_Request(
-            self._LOGIN_URL, compat_urllib_parse.urlencode(login_form), headers=headers)
+            self._LOGIN_URL, urlencode_postdata(login_form), headers=headers)
         login_page = self._download_webpage(
             request, None, 'Logging in as %s' % username)
 
index 571289421e2d63e9e55b036a54ee952e98ccfead..02dfd36f4ace366ccffe18e3cf211eb9fe050c95 100644 (file)
@@ -3,7 +3,10 @@ from __future__ import unicode_literals
 import re
 
 from .common import InfoExtractor
-from ..compat import compat_etree_fromstring
+from ..compat import (
+    compat_etree_fromstring,
+    compat_urlparse,
+)
 from ..utils import (
     ExtractorError,
     int_or_none,
@@ -67,6 +70,17 @@ class VevoIE(InfoExtractor):
         'params': {
             'skip_download': 'true',
         }
+    }, {
+        'note': 'No video_info',
+        'url': 'http://www.vevo.com/watch/k-camp-1/Till-I-Die/USUV71503000',
+        'md5': '8b83cc492d72fc9cf74a02acee7dc1b0',
+        'info_dict': {
+            'id': 'USUV71503000',
+            'ext': 'mp4',
+            'title': 'Till I Die - K Camp ft. T.I.',
+            'duration': 193,
+        },
+        'expected_warnings': ['Unable to download SMIL file'],
     }]
     _SMIL_BASE_URL = 'http://smil.lvl3.vevo.com/'
 
@@ -81,11 +95,17 @@ class VevoIE(InfoExtractor):
         if webpage is False:
             self._oauth_token = None
         else:
+            if 'THIS PAGE IS CURRENTLY UNAVAILABLE IN YOUR REGION' in webpage:
+                raise ExtractorError('%s said: This page is currently unavailable in your region.' % self.IE_NAME, expected=True)
+
             self._oauth_token = self._search_regex(
                 r'access_token":\s*"([^"]+)"',
                 webpage, 'access token', fatal=False)
 
     def _formats_from_json(self, video_info):
+        if not video_info:
+            return []
+
         last_version = {'version': -1}
         for version in video_info['videoVersions']:
             # These are the HTTP downloads, other types are for different manifests
@@ -110,9 +130,8 @@ class VevoIE(InfoExtractor):
             })
         return formats
 
-    def _formats_from_smil(self, smil_xml):
+    def _formats_from_smil(self, smil_doc):
         formats = []
-        smil_doc = compat_etree_fromstring(smil_xml.encode('utf-8'))
         els = smil_doc.findall('.//{http://www.w3.org/2001/SMIL20/Language}video')
         for el in els:
             src = el.attrib['src']
@@ -145,14 +164,14 @@ class VevoIE(InfoExtractor):
             })
         return formats
 
-    def _download_api_formats(self, video_id):
+    def _download_api_formats(self, video_id, video_url):
         if not self._oauth_token:
             self._downloader.report_warning(
                 'No oauth token available, skipping API HLS download')
             return []
 
-        api_url = 'https://apiv2.vevo.com/video/%s/streams/hls?token=%s' % (
-            video_id, self._oauth_token)
+        api_url = compat_urlparse.urljoin(video_url, '//apiv2.vevo.com/video/%s/streams/hls?token=%s' % (
+            video_id, self._oauth_token))
         api_data = self._download_json(
             api_url, video_id,
             note='Downloading HLS formats',
@@ -166,18 +185,26 @@ class VevoIE(InfoExtractor):
             preference=0)
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        video_id = mobj.group('id')
+        video_id = self._match_id(url)
+
+        webpage = None
 
         json_url = 'http://videoplayer.vevo.com/VideoService/AuthenticateVideo?isrc=%s' % video_id
         response = self._download_json(json_url, video_id)
-        video_info = response['video']
+        video_info = response['video'] or {}
 
-        if not video_info:
+        if not video_info and response.get('statusCode') != 909:
             if 'statusMessage' in response:
                 raise ExtractorError('%s said: %s' % (self.IE_NAME, response['statusMessage']), expected=True)
             raise ExtractorError('Unable to extract videos')
 
+        if not video_info:
+            if url.startswith('vevo:'):
+                raise ExtractorError('Please specify full Vevo URL for downloading', expected=True)
+            webpage = self._download_webpage(url, video_id)
+
+        title = video_info.get('title') or self._og_search_title(webpage)
+
         formats = self._formats_from_json(video_info)
 
         is_explicit = video_info.get('isExplicit')
@@ -189,11 +216,11 @@ class VevoIE(InfoExtractor):
             age_limit = None
 
         # Download via HLS API
-        formats.extend(self._download_api_formats(video_id))
+        formats.extend(self._download_api_formats(video_id, url))
 
         # Download SMIL
         smil_blocks = sorted((
-            f for f in video_info['videoVersions']
+            f for f in video_info.get('videoVersions', [])
             if f['sourceType'] == 13),
             key=lambda f: f['version'])
         smil_url = '%s/Video/V2/VFILE/%s/%sr.smil' % (
@@ -205,23 +232,26 @@ class VevoIE(InfoExtractor):
             if smil_url_m is not None:
                 smil_url = smil_url_m
         if smil_url:
-            smil_xml = self._download_webpage(
-                smil_url, video_id, 'Downloading SMIL info', fatal=False)
-            if smil_xml:
-                formats.extend(self._formats_from_smil(smil_xml))
+            smil_doc = self._download_smil(smil_url, video_id, fatal=False)
+            if smil_doc:
+                formats.extend(self._formats_from_smil(smil_doc))
 
         self._sort_formats(formats)
-        timestamp_ms = int_or_none(self._search_regex(
+        timestamp = int_or_none(self._search_regex(
             r'/Date\((\d+)\)/',
-            video_info['launchDate'], 'launch date', fatal=False))
+            video_info['launchDate'], 'launch date', fatal=False),
+            scale=1000) if video_info else None
+
+        duration = video_info.get('duration') or int_or_none(
+            self._html_search_meta('video:duration', webpage))
 
         return {
             'id': video_id,
-            'title': video_info['title'],
+            'title': title,
             'formats': formats,
-            'thumbnail': video_info['imageUrl'],
-            'timestamp': timestamp_ms // 1000,
-            'uploader': video_info['mainArtists'][0]['artistName'],
-            'duration': video_info['duration'],
+            'thumbnail': video_info.get('imageUrl'),
+            'timestamp': timestamp,
+            'uploader': video_info['mainArtists'][0]['artistName'] if video_info else None,
+            'duration': duration,
             'age_limit': age_limit,
         }
index b468023060d3476e0a0ede8e36ea23b25ffeb298..ef096cbd248def4c67a1046c326ce7d1fd6a8796 100644 (file)
@@ -10,8 +10,8 @@ from ..compat import (
     compat_urlparse,
 )
 from ..utils import (
-    determine_ext,
     unified_strdate,
+    qualities,
 )
 
 
@@ -33,6 +33,7 @@ class WDRIE(InfoExtractor):
             'params': {
                 'skip_download': True,
             },
+            'skip': 'Page Not Found',
         },
         {
             'url': 'http://www1.wdr.de/themen/av/videomargaspiegelisttot101-videoplayer.html',
@@ -47,6 +48,7 @@ class WDRIE(InfoExtractor):
             'params': {
                 'skip_download': True,
             },
+            'skip': 'Page Not Found',
         },
         {
             'url': 'http://www1.wdr.de/themen/kultur/audioerlebtegeschichtenmargaspiegel100-audioplayer.html',
@@ -71,6 +73,7 @@ class WDRIE(InfoExtractor):
                 'upload_date': '20140717',
                 'is_live': False
             },
+            'skip': 'Page Not Found',
         },
         {
             'url': 'http://www1.wdr.de/mediathek/video/sendungen/quarks_und_co/filterseite-quarks-und-co100.html',
@@ -83,10 +86,10 @@ class WDRIE(InfoExtractor):
             'url': 'http://www1.wdr.de/mediathek/video/livestream/index.html',
             'info_dict': {
                 'id': 'mdb-103364',
-                'title': 're:^WDR Fernsehen [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
+                'title': 're:^WDR Fernsehen Live [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$',
                 'description': 'md5:ae2ff888510623bf8d4b115f95a9b7c9',
                 'ext': 'flv',
-                'upload_date': '20150212',
+                'upload_date': '20150101',
                 'is_live': True
             },
             'params': {
@@ -150,25 +153,52 @@ class WDRIE(InfoExtractor):
         if upload_date:
             upload_date = unified_strdate(upload_date)
 
+        formats = []
+        preference = qualities(['S', 'M', 'L', 'XL'])
+
         if video_url.endswith('.f4m'):
-            video_url += '?hdcore=3.2.0&plugin=aasp-3.2.0.77.18'
-            ext = 'flv'
+            f4m_formats = self._extract_f4m_formats(video_url + '?hdcore=3.2.0&plugin=aasp-3.2.0.77.18', page_id, f4m_id='hds', fatal=False)
+            if f4m_formats:
+                formats.extend(f4m_formats)
         elif video_url.endswith('.smil'):
-            fmt = self._extract_smil_formats(video_url, page_id)[0]
-            video_url = fmt['url']
-            sep = '&' if '?' in video_url else '?'
-            video_url += sep
-            video_url += 'hdcore=3.3.0&plugin=aasp-3.3.0.99.43'
-            ext = fmt['ext']
+            smil_formats = self._extract_smil_formats(video_url, page_id, False, {
+                'hdcore': '3.3.0',
+                'plugin': 'aasp-3.3.0.99.43',
+            })
+            if smil_formats:
+                formats.extend(smil_formats)
         else:
-            ext = determine_ext(video_url)
+            formats.append({
+                'url': video_url,
+                'http_headers': {
+                    'User-Agent': 'mobile',
+                },
+            })
+
+        m3u8_url = self._search_regex(r'rel="adaptiv"[^>]+href="([^"]+)"', webpage, 'm3u8 url', default=None)
+        if m3u8_url:
+            m3u8_formats = self._extract_m3u8_formats(m3u8_url, page_id, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)
+            if m3u8_formats:
+                formats.extend(m3u8_formats)
+
+        direct_urls = re.findall(r'rel="web(S|M|L|XL)"[^>]+href="([^"]+)"', webpage)
+        if direct_urls:
+            for quality, video_url in direct_urls:
+                formats.append({
+                    'url': video_url,
+                    'preference': preference(quality),
+                    'http_headers': {
+                        'User-Agent': 'mobile',
+                    },
+                })
+
+        self._sort_formats(formats)
 
         description = self._html_search_meta('Description', webpage, 'description')
 
         return {
             'id': page_id,
-            'url': video_url,
-            'ext': ext,
+            'formats': formats,
             'title': title,
             'description': description,
             'thumbnail': thumbnail,
index 5ed723bc6cae2a464e34fad6c48b5ba71e62dab9..daca5d81480337fb50a1fcb85fd69cd249475cf8 100644 (file)
@@ -52,7 +52,7 @@ class FFmpegPostProcessor(PostProcessor):
 
     def _determine_executables(self):
         programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe']
-        prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', False)
+        prefer_ffmpeg = False
 
         self.basename = None
         self.probe_basename = None
@@ -60,6 +60,7 @@ class FFmpegPostProcessor(PostProcessor):
         self._paths = None
         self._versions = None
         if self._downloader:
+            prefer_ffmpeg = self._downloader.params.get('prefer_ffmpeg', False)
             location = self._downloader.params.get('ffmpeg_location')
             if location is not None:
                 if not os.path.exists(location):
index 0f55710069b6941d1241a1e70b6d482febf7d4a0..6cd748b48cb896af4e5d010d4d50f142b1ecd9f2 100644 (file)
@@ -1,3 +1,3 @@
 from __future__ import unicode_literals
 
-__version__ = '2015.12.09'
+__version__ = '2015.12.10'