diff --git a/README.md b/README.md index 9ff4290..ccd4b9f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ # nhknews_dl A PHP script to download daily japanese podcasts from NHK news. Read the COPYING file for my very permissive and delicious license. + +Changes: + +2023-03-21 +---------- + +Updated the XML source instead of relying on the redirection. + + + diff --git a/nhknews_dl.php b/nhknews_dl.php index 2fb1d02..6e2652f 100644 --- a/nhknews_dl.php +++ b/nhknews_dl.php @@ -9,9 +9,9 @@ you think this stuff is worth it, you can buy me a beer in return. */ - # Get file for the NHK website. + # Get file from the NHK website. $xml = file_get_contents( - "https://www.nhk.or.jp/r-news/podcast/nhkradionews.xml"); + "https://www.nhk.or.jp/s-media/news/podcast/list/v1/all.xml"); # Parse file for all http:// references to mp3 files. preg_match_all("/https:\/\/.*\.mp3/", $xml, $out, PREG_SET_ORDER); @@ -21,7 +21,7 @@ # Keep the URL. $url = $values[0]; - # We much know the name of each individual file so that we check if we + # We must know the name of each individual file so that we check if we # already have it. Split each url from slashes. The last one is it. $slashes = explode('/', $url); $filename = array_pop($slashes);