01/10
SP How to see more items in 网站操作
- Enable Office SharePoint Server 发布基础架构 (网站集级别)
- Enable Office SharePoint Server 发布 (Website Function)
Screen Capture:
Dim listUrl As String = TextBox1.Text '获取专辑URL,如 http://www.youku.com/playlist_show/id_2350764.html   
Dim tarUrl As String = "http://v.youku.com/v_playlist/f{0}" '{0}ListID    
        reg = Regex.Match(listUrl, "playlist_show/id_(\d+).*\.html")    
If Not reg.Success Then    
MsgBox("专辑列表提取失败!")    
Exit Sub    
End If    
        g = reg.Groups(1)    
        tarUrl = String.Format(tarUrl, g.Value) & "o{1}p{0}.html" '{0}集数 {1}排序    
        wr1 = HttpWebRequest.Create(TextBox1.Text)    
        wr2 = wr1.GetResponse    
        ret = New StreamReader(wr2.GetResponseStream, Encoding.GetEncoding(wr2.CharacterSet)).ReadToEnd    
        reg = Regex.Match(ret, "<title>(.+) - 专辑 - 优酷视频</title>")    
If Not reg.Success Then    
MsgBox("专辑名称提取失败!")    
Else    
            g = reg.Groups(1)    
MsgBox("专辑名:《" & g.Value & "》")    
End If
   ret = New StreamReader(wr2.GetResponseStream, Encoding.GetEncoding(wr2.CharacterSet)).ReadToEnd   
'TextBox2.Text = ret    
' 创建一个临时视频列表变量    
Dim nlist As New VList    
            nlist.id = nowid '获取ID    
' 获取videoId    
            reg = Regex.Match(ret, "var\s+videoId\s*=\s*""(\d+)""\s*;")    
If Not reg.Success Then Exit Do    
            g = reg.Groups(1)    
' 如果VID等于上一个VID最退出    
If g.Value = preVid Then Exit Do    
            nlist.vid1 = g.Value    
' 获取videoId2    
            reg = Regex.Match(ret, "var\s+videoId2\s*=\s*""((\w|=)+)""\s*;")  '"var\s+videoId2\s*=\s*""(\w+)""\s*;")    
If Not reg.Success Then Exit Do    
            g = reg.Groups(1)    
            nlist.vid2 = g.Value    
' 获取标题    
            reg = Regex.Match(ret, "<title>(.+) - (.+) - 视频 - 优酷视频 - 在线观看 - </title>")    
If Not reg.Success Then    
                nlist.title = "{名称查找错误}"    
Else    
                g = reg.Groups(2)    
                nlist.title = g.Value    
End If
 -->
 -->



0 Comments:
Post a Comment
<< Home