我想获取(youtube)“订阅”按钮的文本

时间:2018-10-18 12:50:43

标签: youtube youtube-api subscribe

我想获取(youtube)“订阅”按钮的文字 在C#的文本框中 例如我打开表格 我收到此按钮文字 那就是“订阅” 在文本框中。

1 个答案:

答案 0 :(得分:0)

{             尝试             {                 字符串url = this.textBoxLink.Text;                 HttpWebRequest request =(HttpWebRequest)WebRequest.Create(url);                 HttpWebResponse响应=(HttpWebResponse)request.GetResponse();                 StreamReader sr = new StreamReader(response.GetResponseStream());                 this.richTextBoxSC.Text = sr.ReadToEnd();                 字符串imgpath = this.SearchY(this.richTextBoxSC,“ thumbnailUl”,20,“ \”>“)。ToString();                 this.pictureBoxThumb.ImageLocation = imgpath;                 字符串标题= this.SearchY(this.richTextBoxSC,“”,25,“

”)。ToString();                 如果(title.Contains(“ \”“))                 {                     title = this.SearchY(this.richTextBoxSC,“ class = \”样式范围ytd-subscribe-button-renderer \“”,60,“
            }