Updated my pages of Chinese red songs and Soviet red songs

They are at https://gmachine1729.com/lists/%e4%b8%ad%e5%9b%bd%e7%ba%a2%e6%ad%8c/ and https://gmachine1729.com/lists/%d1%81%d0%be%d0%b2%d0%b5%d1%82%d1%81%d0%ba%d0%b8%d0%b5-%d0%bf%d0%b5%d1%81%d0%bd%d0%b8/.

Additionally I made recently a page of DPRK music videos and films/parades (like The Flower Girl) but this one is quite short and incomplete for now.

Before I basically just a list of links of online videos. Since Russia doesn’t really have its own video site, the Russian ones were all YouTube, and the Chinese ones were half YouTube, half Chinese video sites. I have been aware that WordPress automatically embeds YouTube videos, so it occurred to me that I could with some JavaScript code within the browser pull out all the hrefs with youtube.com. I looked up https://zhidao.baidu.com/question/1239977170942371939.html with some code and based on it I ran

hrefArr = document.getElementsByTagName('a');
for( var i=0; i<hrefArr.length; i++ ){
  if (hrefArr[i].href.indexOf("youtube") > -1) { 
    console.log(hrefArr[i].href)
  }
}

to get

2019-07-09 下午9.28.06

copy pasting the printed urls into a text editor and a s/VM802:1/ and copy pasting the result back into the WordPress editor did the trick.

2019-07-09 下午9.42.01

And yes for the Chinese ones, for all the ones without YouTube links, I found a YouTube video of that song, added it, and when finished with the manual searching and adding, reran the extract and embed all youtube urls process described above.

The result (scrolled screenshot taken via this Nimbus browser plugin):

chinese-red-songs-youtube-embedded-list-part1chinese-red-songs-youtube-embedded-list-part2

Advertisements