Skip to content

Instantly share code, notes, and snippets.

@Sofronio
Sofronio / ytb.sh
Last active January 16, 2019 21:24
ytb: Download YouTube video and upload to Baiduyun automaticly.
#!/bin/sh
#youtube-dl download and Baiduyun bypy auto upload
#Written by Sofronio
echo -n "youtube-dl start. Please input the youtube id\n"
read youtubeid
#set path as youtube-dl downlaod path
cd /root/y/
@Sofronio
Sofronio / Subtitle.cs
Last active May 5, 2018 04:46
YouTube2SubtitleClass
class subtitle
{
public string Content
{
get
{
return content;
}
set
@Sofronio
Sofronio / YouTube2Subtitle.cs
Created May 5, 2018 04:50
YouTube2Subtitle
private void processXML(string filesWithPath)
{
if (filesWithPath != "")
{
mySubtitle.Clear();
XmlDocument myXMLDoc = new XmlDocument();
myXMLDoc.Load(filesWithPath);
var ps = myXMLDoc.GetElementsByTagName("p");
//each p is a TimedLine