C++实现优酷土豆去视频广告的方法

本文实例讲述了C++实现优酷土豆去视频广告的方法。分享给大家供大家参考。具体分析如下:

之前写的一个工具,好不好用我不知道,我自己用着挺好,编译环境VC6.0,原理是改HOST文件,不过还改了其他地方,可以看看源码,暂时支持XP,WIN7没写,代码可能有些乱,有兴趣的朋友可以自己改改。

// guanggaoDlg.cpp : implementation file
WIN32_FIND_DATA FindFileData;
void CGuanggaoDlg::OnButton1()
{
//屏蔽功能
CopyFile("C:\\WINDOWS\\system32\\drivers\\etc\\hosts","C:\\WINDOWS\\system32\\drivers\\etc\\bak.hosts",TRUE);
    TCHAR lujing[MAX_PATH] = "C:\\Documents and Settings\\Administrator\\Application Data\\Macromedia\\Flash Player\\#SharedObjects\\";
    TCHAR lujing2[MAX_PATH] = "C:\\Documents and Settings\\Administrator\\Application Data\\Macromedia\\Flash Player\\#SharedObjects\\";
    TCHAR youku[MAX_PATH] = "\\static.youku.com";
    TCHAR tudou[MAX_PATH] = "\\js.tudouui.com";
    HANDLE hFist = FindFirstFile("C:\\Documents and Settings\\Administrator\\Application Data\\Macromedia\\Flash Player\\#SharedObjects\\*",&FindFileData);
    FindNextFile (hFist, &FindFileData);
    FindNextFile (hFist, &FindFileData);
    strcat(lujing,FindFileData.cFileName);
    strcat(lujing2,FindFileData.cFileName);
    LPSTR dedaoquanlujing = strcat(lujing,youku);
    LPSTR dedaoquanlujing2 = strcat(lujing2,tudou);
    SHFILEOPSTRUCT filecaoz;
    ZeroMemory(&filecaoz,sizeof(filecaoz));
    filecaoz.wFunc = FO_DELETE;
    filecaoz.fFlags = FOF_NOCONFIRMATION|FOF_SIMPLEPROGRESS;
    filecaoz.hNameMappings = NULL;
    filecaoz.hwnd = NULL;
    filecaoz.lpszProgressTitle = NULL;
    filecaoz.pFrom = dedaoquanlujing;
    SHFileOperation(&filecaoz);
    SHFILEOPSTRUCT filecaoz2;
    ZeroMemory(&filecaoz2,sizeof(filecaoz2));
    filecaoz.wFunc = FO_DELETE;
    filecaoz.fFlags = FOF_NOCONFIRMATION|FOF_SIMPLEPROGRESS;
    filecaoz.hNameMappings = NULL;
    filecaoz.hwnd = NULL;
    filecaoz.lpszProgressTitle = NULL;
    filecaoz.pFrom = dedaoquanlujing2;
    SHFileOperation(&filecaoz2);
    SetFileAttributes(dedaoquanlujing,0);
    DeleteFile(dedaoquanlujing);
    DeleteFile(dedaoquanlujing2);
    HANDLE wenjian = CreateFile(dedaoquanlujing,GENERIC_WRITE|GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
    HANDLE wenjian2 = CreateFile(dedaoquanlujing2,GENERIC_WRITE|GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
    SetFileAttributes(dedaoquanlujing,0);
    SetFileAttributes(dedaoquanlujing2,0);
    CloseHandle(hFist);
    CloseHandle(wenjian);
    CloseHandle(wenjian2);
  //HOST
    SetFileAttributes("C:\\WINDOWS\\system32\\drivers\\etc\\hosts",0);
    HANDLE wenjianjubing = CreateFile("C:\\WINDOWS\\system32\\drivers\\etc\\hosts",GENERIC_WRITE|GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
    //去优酷
    DWORD sizebuff = 0;
    char a1[] = {"#youku\r\n"};
    char a2[] = {"127.0.0.1 atm.youku.com\r\n"};
    char a3[] = {"127.0.0.1 Fvid.atm.youku.com\r\n"};
    char a4[] = {"127.0.0.1 html.atm.youku.com\r\n"};
    char a5[] = {"127.0.0.1 valb.atm.youku.com\r\n"};
    char a6[] = {"127.0.0.1 valf.atm.youku.com\r\n"};
    char a7[] = {"127.0.0.1 valo.atm.youku.com\r\n"};
    char a8[] = {"127.0.0.1 valp.atm.youku.com\r\n"};
    char a9[] = {"127.0.0.1 lstat.youku.com\r\n"};
    char a10[] = {"127.0.0.1 speed.lstat.youku.com\r\n"};
    char a11[] = {"127.0.0.1 urchin.lstat.youku.com\r\n"};
    char a12[] = {"127.0.0.1 stat.youku.com\r\n"};
    char a13[] = {"127.0.0.1 valc.atm.youku.com\r\n"};
    char a14[] = {"127.0.0.1 vid.atm.youku.com\r\n"};
    char a15[] = {"127.0.0.1 walp.atm.youku.com\r\n"};
    char a16[] = {"127.0.0.1 static.lstat.youku.com\r\n"};
    WriteFile(wenjianjubing,a1,sizeof(a1)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a2,sizeof(a2)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a3,sizeof(a3)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a4,sizeof(a4)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a5,sizeof(a5)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a6,sizeof(a6)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a7,sizeof(a7)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a8,sizeof(a8)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a9,sizeof(a9)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a10,sizeof(a10)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a11,sizeof(a11)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a12,sizeof(a12)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a13,sizeof(a13)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a14,sizeof(a14)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a15,sizeof(a15)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a16,sizeof(a16)-1,&sizebuff,NULL);
  //去土豆
    char b0[] = {"#tudou\r\n"};
    char b1[]={"127.0.0.1 adextensioncontrol.tudou.com\r\n"};
    char b2[]={"127.0.0.1 iwstat.tudou.com\r\n"};
    char b3[]={"127.0.0.1 nstat.tudou.com\r\n"};
    char b4[]={"127.0.0.1 stats.tudou.com\r\n"};
    char b5[]={"127.0.0.1 *.p2v.tudou.com*\r\n"};
    char b6[]={"127.0.0.1 at-img1.tdimg.com\r\n"};
    char b7[]={"127.0.0.1 at-img2.tdimg.com\r\n"};
    char b8[]={"127.0.0.1 at-img3.tdimg.com\r\n"};
    char b9[]={"127.0.0.1 adplay.tudou.com\r\n"};
    char b10[]={"127.0.0.1 adcontrol.tudou.com\r\n"};
    char b11[]={"127.0.0.1 stat.tudou.com\r\n"};
    WriteFile(wenjianjubing,b0,sizeof(b0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b1,sizeof(b1)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b2,sizeof(b2)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b3,sizeof(b3)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b4,sizeof(b4)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b5,sizeof(b5)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b6,sizeof(b6)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b7,sizeof(b7)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b8,sizeof(b8)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b9,sizeof(b9)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b10,sizeof(b10)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,b11,sizeof(b11)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,a15,sizeof(a15)-1,&sizebuff,NULL);
  //去酷6
    char c0[] = {"#ku6\r\n"};
    char c1[]={"127.0.0.1 1.allyes.com.cn\r\n"};
    char c2[]={"127.0.0.1 analytics.ku6.com\r\n"};
    char c3[]={"127.0.0.1 gug.ku6cdn.com\r\n"};
    char c4[]={"127.0.0.1 ku6.allyes.com\r\n"};
    char c5[]={"127.0.0.1 ku6afp.allyes.com\r\n"};
    char c6[]={"127.0.0.1 pq.stat.ku6.com\r\n"};
    char c7[]={"127.0.0.1 st.vq.ku6.cn\r\n"};
    char c8[]={"127.0.0.1 stat0.888.ku6.com\r\n"};
    char c9[]={"127.0.0.1 stat1.888.ku6.com\r\n"};
    char c10[]={"127.0.0.1 stat2.888.ku6.com\r\n"};
    char c11[]={"127.0.0.1 stat3.888.ku6.com\r\n"};
    char c12[]={"127.0.0.1 static.ku6.com\r\n"};
    char c13[]={"127.0.0.1 v0.stat.ku6.com\r\n"};
    char c14[]={"127.0.0.1 v1.stat.ku6.com\r\n"};
    char c15[]={"127.0.0.1 v2.stat.ku6.com\r\n"};
    char c16[]={"127.0.0.1 v3.stat.ku6.com\r\n"};
    WriteFile(wenjianjubing,c0,sizeof(c0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c1,sizeof(c1)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c2,sizeof(c2)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c3,sizeof(c3)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c4,sizeof(c4)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c5,sizeof(c5)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c6,sizeof(c6)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c7,sizeof(c7)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c8,sizeof(c8)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c9,sizeof(c9)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c10,sizeof(c10)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c11,sizeof(c11)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c12,sizeof(c12)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c13,sizeof(c13)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c14,sizeof(c14)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c15,sizeof(c15)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,c16,sizeof(c16)-1,&sizebuff,NULL);
  // //去奇艺广告
    char d0[] = {"#qiyi\r\n"};
    char d1[]={"127.0.0.1 afp.qiyi.com\r\n"};
    char d2[]={"127.0.0.1 focusbaiduafp.allyes.com\r\n"};
    WriteFile(wenjianjubing,d0,sizeof(d0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,d1,sizeof(d1)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,d2,sizeof(d2)-1,&sizebuff,NULL);
  //新浪视频
    char e0[] = {"#sina\r\n"};
    char e3[]={"127.0.0.1 dcads.sina.com.cn\r\n"};
    WriteFile(wenjianjubing,e0,sizeof(e0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,e3,sizeof(e3)-1,&sizebuff,NULL);
  //去PPTV
    char f0[] = {"#pptv\r\n"};
    char f4[]={"127.0.0.1 pp2.pptv.com\r\n"};
    WriteFile(wenjianjubing,f0,sizeof(f0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,f4,sizeof(f4)-1,&sizebuff,NULL);
  //搜狐
    char g0[] = {"#sohu\r\n"};
    char g5[]={"127.0.0.1images.sohu.com\r\n"};
    WriteFile(wenjianjubing,g0,sizeof(g0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,g5,sizeof(g5)-1,&sizebuff,NULL);
  //乐视
    char h0[] = {"#leshi\r\n"};
    char h6[]={"127.0.0.1 pro.letv.com\r\n"};
    WriteFile(wenjianjubing,h0,sizeof(h0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,h6,sizeof(h6)-1,&sizebuff,NULL);
  //迅雷看看
    char j0[] = {"#xunlei\r\n"};
    char j1[]={"127.0.0.1 mcfg.sandai.net\r\n"};
    char j2[]={"127.0.0.1 biz5.sandai.net\r\n"};
    char j3[]={"127.0.0.1 server1.adpolestar.net\r\n"};
    char j4[]={"127.0.0.1 advstat.xunlei.com\r\n"};
    char j5[]={"127.0.0.1 mpv.sandai.net\r\n"};
    WriteFile(wenjianjubing,j0,sizeof(j0)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,j1,sizeof(j1)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,j2,sizeof(j2)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,j3,sizeof(j3)-1,&sizebuff,NULL);
    WriteFile(wenjianjubing,j3,sizeof(j3)-1,&sizebuff,NULL);
  //QQ
  char qq1[]={"#qq\r\n"};
  char qq2[]={"127.0.0.1 adslvfile.qq.com\r\n"};
  char qq3[]={"127.0.0.1 adsfile.qq.com\r\n"};
  WriteFile(wenjianjubing,qq1,sizeof(qq1)-1,&sizebuff,NULL);
  WriteFile(wenjianjubing,qq2,sizeof(qq2)-1,&sizebuff,NULL);
  BOOL bWite = WriteFile(wenjianjubing,qq3,sizeof(qq3)-1,&sizebuff,NULL);
    if(bWite != 0)
    {
      AfxMessageBox("屏蔽成功!");
      SetFileAttributes("C:\\WINDOWS\\system32\\drivers\\etc\\hosts",1);
      system("echo y|cacls C:\\WINDOWS\\system32\\drivers\\etc\\hosts /g everyone:r");
      return;
    }
    else
    {
      AfxMessageBox("已经屏蔽!");
      return;
    }
  }
  void CGuanggaoDlg::OnButton2()
  {
  //恢复
    TCHAR lujing[MAX_PATH] = "C:\\Documents and Settings\\Administrator\\Application Data\\Macromedia\\Flash Player\\#SharedObjects\\";
    TCHAR lujing2[MAX_PATH] = "C:\\Documents and Settings\\Administrator\\Application Data\\Macromedia\\Flash Player\\#SharedObjects\\";
    TCHAR mingche2[MAX_PATH] = "\\static.youku.com";
    TCHAR tudou[MAX_PATH] = "\\js.tudouui.com";
    HANDLE hFist2 = FindFirstFile("C:\\Documents and Settings\\Administrator\\Application Data\\Macromedia\\Flash Player\\#SharedObjects\\*",&FindFileData);
    FindNextFile (hFist2, &FindFileData);
    FindNextFile (hFist2, &FindFileData);
    strcat(lujing,FindFileData.cFileName);
    strcat(lujing2,FindFileData.cFileName);
    LPSTR dedaoquanlujing = strcat(lujing,mingche2);
    LPSTR dedaoquanlujing2 = strcat(lujing2,tudou);
    DeleteFile(dedaoquanlujing);
    DeleteFile(dedaoquanlujing2);
    CloseHandle(hFist2);
    system("echo y|cacls C:\\WINDOWS\\system32\\drivers\\etc\\hosts /g everyone:f");
    SetFileAttributes("C:\\WINDOWS\\system32\\drivers\\etc\\hosts",0);
    BOOL bCpy = CopyFile("C:\\WINDOWS\\system32\\drivers\\etc\\bak.hosts","C:\\WINDOWS\\system32\\drivers\\etc\\hosts",FALSE);
    if(bCpy != 0)
    {
      AfxMessageBox("恢复成功!");
      return;
    }
    else
    {
      AfxMessageBox("恢复失败!");
      return;
    }
  }
  void CGuanggaoDlg::OnButton3()
  {
    //优酷测试
    ShellExecute(NULL,"open","http://www.youku.com",NULL,NULL,SW_SHOWNORMAL);
  }

希望本文所述对大家的C++程序设计有所帮助。

(0)

相关推荐

  • 在视频前插入广告

    1.加入背景图片      <TD align=middle width=329                  background="IMAGES/vod_05.jpg"> <OBJECT id=NSPlay                    codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701            

  • 文章中优酷视频全屏及去除广告在线转换

    近来翻看很多朋友的BLOG,都发现很多好看的优酷视频不能全屏,或一点全屏又跳到官方网了,结果又要重新缓冲. 于是就找了一些资料拼了一个在线转换的出来.(不算是插件,算是一个辅助工具吧) 我分别添加了两个相同的视频,一个是没有修改过的视频,不能全屏.一个是修改过的视频,可以全屏. 具体大家对比一下.转换器和下载都在两个视频的下面,大家可以试一下. (注:这个转换器是用php,UTF-8写的,不同编码的朋友可以转换一下,出现乱码不负责任) 加优酷视频请用FCKeditor模式.再把转换好的地址复出去

  • 页面中加载优酷视频去掉广告的方法

    1.优酷视频去广告代码: <embed src=" http://static.youku.com/v1.0.0149/v/swf/qplayer_rtmp.swf?VideoIDS=你的视频ID&winType=adshow&isAutoPlay=true" quality="high" width="宽度" height="高度" align="middle" type="

  • Js右下角视频广告代码(百度视窗)

    右下角视窗 请看窗口右下角 var BD_HY_VIDEOAD={};(function(){var F={videoId:"BD_HY_VIDEOAD_"+new Date().getTime().toString().substring(5,13),bgFlashShow:0,bdLogoShow:"true",bdSmallShow:"true",bdLogo:"http://eiv.baidu.com/mapm2/0306vid

  • Android 破解视频App去除广告功能详解及解决办法总结

    Android 破解视频App去除广告功能 作为一个屌丝程序猿也有追剧的时候,但是当打开视频app的时候,那些超长的广告已经让我这个屌丝无法忍受了,作为一个程序猿看视频还要出现广告那就是打我脸,但是我有没有钱买会员,只能靠着毕生技能去耍耍去除广告了.下面就来介绍一下如何进行视频广告的去除. 一.视频广告播放原理 首先我们需要了解的一个基本知识点那就是广告其实也是一段视频,那么他肯定有请求地址和播放地址.那么我们的思路就来了,如果能够得到这些地址的话,我们就可以去除广告了,为什么呢?因为我们知道所

  • C++实现优酷土豆去视频广告的方法

    本文实例讲述了C++实现优酷土豆去视频广告的方法.分享给大家供大家参考.具体分析如下: 之前写的一个工具,好不好用我不知道,我自己用着挺好,编译环境VC6.0,原理是改HOST文件,不过还改了其他地方,可以看看源码,暂时支持XP,WIN7没写,代码可能有些乱,有兴趣的朋友可以自己改改. // guanggaoDlg.cpp : implementation file WIN32_FIND_DATA FindFileData; void CGuanggaoDlg::OnButton1() { //

  • PHP实现将优酷土豆腾讯视频html地址转换成flash swf地址的方法

    本文实例讲述了PHP实现将优酷土豆腾讯视频html地址转换成flash swf地址的方法.分享给大家供大家参考,具体如下: 很多用户不知道如何复制flash地址,只能在程序中帮他们替换了: <?php /** * 支持优酷.土豆.腾讯视频html到swf转换 */ function convert_html_to_swf($url = '') { if(!is_string($url) || empty($url)) return ; if(strpos($url, 'swf')) return

  • Android编程实现仿优酷圆盘旋转菜单效果的方法详解【附demo源码下载】

    本文实例讲述了Android编程实现仿优酷圆盘旋转菜单效果的方法.分享给大家供大家参考,具体如下: 目前,用户对安卓应用程序的UI设计要求越来越高,因此,掌握一些新颖的设计很有必要. 比如菜单,传统的菜单已经不能满足用户的需求. 其中优酷中圆盘旋转菜单的实现就比较优秀,这里我提供下我的思路及实现,仅供参考. 该菜单共分里外三层导航菜单.可以依次从外向里关闭三层菜单,也可以反向打开,并且伴有圆盘旋转的动画效果 首先,看下效果: 以下是具体的代码及解释: 1. 菜单布局文件: 大家看到主要有三个Ra

  • python+ffmpeg批量去视频开头的方法

    用来批量切割视频的开头部分,比如去掉一部电视剧的序幕,看着难受不说数量还很多,很菜鸟的一篇,毕竟我也是一个菜鸟,首先要有ffmpeg这个软件,安装什么的就不说了,网上一搜就出来了,直接给代码,以后丢了也不怕.自用的,没写那么多 #/usr/bin/python #coding:u8 import os pp=os.getcwd() path=''#视频所在目录 time=''#格式为hh:mm:ss[.xxx]的形式 for i in os.listdir(path): os.system("&

  • PHP实现使用优酷土豆视频地址获取swf播放器分享地址

    项目用到临时写的.待完善: 复制代码 代码如下: /*     * 根据用户提交的(swf/html)地址,获取优酷,土豆的swf播放地址     * */    private function _getSwf ($url = '') {        if(isset($url) && !empty($url)){            preg_match_all('/http:\/\/(.*?)?\.(.*?)?\.com\/(.*)/',$url,$types);       

  • Android 使用Vitamio打造自己的万能播放器(5)——在线播放(播放优酷视频)

     前言 为了保证每周一篇的进度,又由于Vitamio新版本没有发布, 决定推迟本地播放的一些功能(截图.视频时间.尺寸等),跳过直接写在线播放部分的章节.从Vitamio的介绍可以看得出,其支持http.m3u8等多种网络协议,本章将编写播放优酷视频的例子. 系列 1.Android使用Vitamio打造自己的万能播放器(1)--准备 2.Android使用Vitamio打造自己的Android万能播放器(2)-- 手势控制亮度.音量.缩放 3.Android使用Vitamio打造自己的Andr

  • JavaScript使用DeviceOne开发实战(四)仿优酷视频应用

    大家没有进行开发之前首先需要考虑系统的差异性,比如说IOS手机有没有回退键,所以在开发时一定要考虑二级解密需要有回退键,否则ios的手机就会陷入到这个页面回不去. 安卓系统有回退键,针对这个情况需要要求用户在3秒钟之内连续按回退键两次才退出系统,以此防止用户误按回退键,具体代码实现如下: [mw_shl_code=javascript,true]page.on("back", function(){ if (canBack) { global.exit(); } else { nf.t

  • C#实现的优酷真实视频地址解析功能(2014新算法)

    序:优酷之前更新了次算法(很久之前了,呵呵...),故此很多博客的解析算法已经无法使用.很多大牛也已经更新了新的解析方法.我也在此写篇解析过程的文章.(本文使用语言为C#) 由于优酷视频地址时间限制,在你访问本篇文章时,下面所属链接有可能已经失效,望见谅. 例:http://v.youku.com/v_show/id_XNzk2NTI0MzMy.html 1:获取视频vid 在视频url中标红部分.一个正则表达式即可获取. 复制代码 代码如下: string getVid(string url)

随机推荐