Help? youtube grabbing...... ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help? youtube grabbing...... ?

    Urls for downloading youtube video`s are on the youtube page eg:

    goto YouTube - Funny Animation

    and right click and view source

    Press Ctrl F and search for: &fmt_url_map=

    you will then find a long string of urls .....

    this string is the video download links but:

    &title=name

    needs adding on end of 1 url.


    (you can try the above and download any youtube video) ^^

    Grabbing this information is where the problem begins....

    here was a quick attempt at grabbing and parsing each url to a link:
    PHP Code:
    <?php  
    //error_reporting  (E_ALL);
    //ini_set ('display_errors', true);

    $url $_GET['url'];
    if(
    $url==''
    $url 'http://www.youtube.com/watch?v=0_fPV13lKm4&fmt=18';
     else 
    $url $url.'&fmt=18';


    $userAgent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9' 
    $language 'en-us,en;q=0.7,de-de;q=0.3';
    $accept 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,;q=0.5';
    $ch curl_init();
    curl_setopt($chCURLOPT_URL$url);  
    curl_setopt($chCURLOPT_RETURNTRANSFER1);  
    curl_setopt($chCURLOPT_USERAGENT$userAgent); 
    curl_setopt($chCURLOPT_HTTPHEADER, array('Accept-Language: '.$language));
    $page curl_exec($ch);  
    curl_close($ch);


    $start strpos($page,'&amp;fmt_url_map=');
    $finish strpos($page,'&amp;csi_page_type=watch'); 
    $length $finish-$start;
    $page substr($page,$start,$length); 
    $page urldecode($page); 
    $page preg_replace('/&amp;fmt_url_map=(.*?)http/','http',$page);
    $page str_replace('%2C',',',$page);

    $page explode('|'$page);

    $num count($page);
    for (
    $i 0$i <$num$i++) {

        if(
    substr($page[$i],-2)=='13'){    $format '3GP Low Quality - 176×144'$n=3; }
        else if(
    substr($page[$i],-2)=='17'){ $format '3GP Medium Quality - 176×144'$n=3; }
        else if(
    substr($page[$i],-2)=='36'){ $format '3GP High Quality - 320×240'$n=3; }
        else if(
    substr($page[$i],-2)=='34'){ $format 'FLV Medium Quality - 480×360'$n=3; }
        else if(
    substr($page[$i],-2)=='35'){ $format 'FLV High Quality - 854×480'$n=3; }
        else if(
    substr($page[$i],-2)=='18'){ $format 'MP4 High Quality - 480×360'$n=3; }
        else if(
    substr($page[$i],-2)=='22'){ $format 'MP4 High Definition - 1280×720'$n=3; }
        else if(
    substr($page[$i],-2)=='37'){ $format 'MP4 High Definition - 1920×1080'$n=3; }
        else if(
    substr($page[$i],-2)=='38'){ $format 'MP4 Epic Definition - 4096×2304'$n=3; }
        else if(
    substr($page[$i],-2)=='43'){ $format 'WebM High Definition - 854×480'$n=3; }
        else if(
    substr($page[$i],-2)=='45'){ $format 'WebM High Definition - 1280×720'$n=3; }
        else if(
    substr($page[$i],-1)=='5'){ $format 'FLV Low Quality - 400×226'$n=2; }
        else if(
    substr($page[$i],-1)=='6'){ $format 'FLV Medium Quality - 640×360'$n=2; }
        else 
    $format 'Unknown Format';
        echo 
    '<a href="'.substr($page[$i],0,-$n).'&title=Something_Else">Download '.$format.'</a><br/><br/>';

    }

    ?>
    ^ The Above Code Grabbed all Urls And Split them equally.....
    How ever when you grab the page by cURL part of the link is removed by youtube

    part removed will look something like this:
    %252Coc%253AG0hPSFJQUl9FSkNOOV7KSlZB
    or like this when url decoded:
    ,oc:253AG0hPSFJQUl9FSkNOOV7KSlZB


    Which stops you from downloading the video .....

    This string is also missing when you turn cookies off on your browser and goto the page and view source...

    So im guessing one or more of the 5 Cookies is required to get this missing string..
    Cookie names are:
    GEO
    PREF
    VISITOR_INFO1_LIVE
    recently_watched_video_id_list
    use_hitbox

    At a guess i would say it was either GEO or VISITOR_INFO1_LIVE that is required as you will also notice that the first digits of your ip address is in the download link ip=(first digits).0.0.0

    eg:
    PHP Code:
    curl_setopt($ch,CURLOPT_COOKIE,"GEO=geo cookie here; domain=.youtube.com; path=/");
    curl_setopt($ch,CURLOPT_COOKIE,"PREF=pref cookie here; domain=.youtube.com; path=/");
    curl_setopt($ch,CURLOPT_COOKIE,"VISITOR_INFO1_LIVE=live cookie here; domain=.youtube.com; path=/");
    curl_setopt($ch,CURLOPT_COOKIE,"recently_watched_video_id_list=recently watched cookie here; domain=.youtube.com; path=/");
    curl_setopt($ch,CURLOPT_COOKIE,"use_hitbox=use hitbox cookie here; domain=.youtube.com; path=/"); 

    Would be good to get this working for mobiles again as my web version doesn't work on mobiles
    Last edited by something else; 19.04.11, 17:18.

    #2
    Very busy to test,
    Btw thanks for the tips where URL can found.
    Did I help you?
    You can help me too
    Your donations will help me finance my studies.

    Comment


      #3
      if you want to grab a flv video you can play with this example:

      PHP Code:
          $info_urls GoGum_getVideoURL('PYzW5-2zIv0');
          
              foreach(
      $info_urls as $info_url){ 
                      echo 
      $info_url;
                      
      $headers get_headers($info_url.'&fmt=17');
                      
      print_r($headers);
              }
          
          function 
      GoGum_getVideoURL($youtube_id)
          {
              
      $info_url 'http://www.youtube.com/get_video_info?video_id='.$youtube_id.'&fmt=13';
              
      $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg'
              
      $headers[] = 'Connection: Keep-Alive'
              
      $headers[] = 'Content-type: application/x-www-form-urlencoded;charset=UTF-8'
              
      $user_agent $_SERVER['HTTP_USER_AGENT'];
              
      $ch curl_init ($info_url);
              
      curl_setopt($chCURLOPT_HTTPHEADER$headers); 
              
      curl_setopt($chCURLOPT_USERAGENT$user_agent);
              
      curl_setopt($chCURLOPT_HEADER1);
              
      curl_setopt($chCURLOPT_HTTP_VERSIONCURL_HTTP_VERSION_1_0);
              
      curl_setopt($chCURLOPT_FOLLOWLOCATION1);
              
      curl_setopt($chCURLOPT_AUTOREFERER0);
              
      curl_setopt ($chCURLOPT_RETURNTRANSFERtrue);
              
      $output curl_exec ($ch);

              
      $vars explode('&'$output);
              foreach(
      $vars as $var){ //search the headers for the location url of youtube video
                  
      $variable explode('='$var2);
                  $
      $variable[0] = $variable[1];
              }
              
      $vars explode('|'urldecode($fmt_url_map));
              foreach(
      $vars as $var){ 
                  if(
      strlen($var)>5)$urls[] = $var;
              }

              
              if(
      is_array($urls)){
                  return 
      $urls
              }else{
                  return 
      false;
              }
              
              
          } 
      Advertise your mobile site for FREE with AdTwirl

      Comment


        #4
        I think YT uses Javascript to set the cookie .... seeming curl can not run Javascript

        So back to grabbing by .jar :/ unless anyone has or can make/has a Javascript interpreter for curl?

        Added after 15 minutes:

        For anyone who is interested here is keephd.com .jar youtube (+many others sites) grabber script:
        KeepHDDownloader.class
        PHP Code:
        import java.applet.AppletContext;
        import java.io.ByteArrayOutputStream;
        import java.io.InputStream;
        import java.io.PrintStream;
        import java.net.HttpURLConnection;
        import java.net.URL;
        import java.net.URLDecoder;
        import java.util.LinkedList;
        import java.util.regex.Matcher;
        import java.util.regex.Pattern;
        import javax.swing.JApplet;
        import netscape.javascript.JSObject;

        public class 
        KeepHDDownloader extends JApplet
        {
          private 
        String mv_decrypt(String paramStringint paramInt1int paramInt2)
          {
            
        LinkedList localLinkedList1 = new LinkedList();
            for (
        int i 0paramString.length(); i++)
            {
              
        paramString.charAt(i);
              switch (
        j)
              {
              case 
        48:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        49:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        50:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        51:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        52:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        53:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        54:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        55:
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        56:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        57:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        97:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        98:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        99:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        100:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                
        localLinkedList1.add(Integer.valueOf(1));
                break;
              case 
        101:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(0));
                break;
              case 
        102:
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
                
        localLinkedList1.add(Integer.valueOf(1));
              case 
        58:
              case 
        59:
              case 
        60:
              case 
        61:
              case 
        62:
              case 
        63:
              case 
        64:
              case 
        65:
              case 
        66:
              case 
        67:
              case 
        68:
              case 
        69:
              case 
        70:
              case 
        71:
              case 
        72:
              case 
        73:
              case 
        74:
              case 
        75:
              case 
        76:
              case 
        77:
              case 
        78:
              case 
        79:
              case 
        80:
              case 
        81:
              case 
        82:
              case 
        83:
              case 
        84:
              case 
        85:
              case 
        86:
              case 
        87:
              case 
        88:
              case 
        89:
              case 
        90:
              case 
        91:
              case 
        92:
              case 
        93:
              case 
        94:
              case 
        95:
              case 
        96: }  } LinkedList localLinkedList2 = new LinkedList();
            for (
        int j 0384j++)
            {
              
        paramInt1 = (paramInt1 11 77213) % 81371;
              
        paramInt2 = (paramInt2 17 92717) % 192811;
              
        localLinkedList2.add(Integer.valueOf((paramInt1 paramInt2) % 128));
            }
            
        int m;
            for (
        256>= 0j--)
            {
              
        = ((Integer)localLinkedList2.get(j)).intValue();
              
        128;
              
        int n = ((Integer)localLinkedList1.get(k)).intValue();
              
        localLinkedList1.set(klocalLinkedList1.get(m));
              
        localLinkedList1.set(mInteger.valueOf(n));
            }

            for (
        0128j++) {
              
        localLinkedList1.set(jInteger.valueOf(((Integer)localLinkedList1.get(j)).intValue() ^ ((Integer)localLinkedList2.get(256)).intValue() & 0x1));
            }
            
        String str "";
            for (
        int k 0localLinkedList1.size(); += 4)
            {
              
        = ((Integer)localLinkedList1.get(k)).intValue() * 8;
              
        += ((Integer)localLinkedList1.get(1)).intValue() * 4;
              
        += ((Integer)localLinkedList1.get(2)).intValue() * 2;
              
        += ((Integer)localLinkedList1.get(3)).intValue();
              switch (
        m)
              {
              case 
        0:
                
        str str "0";
                break;
              case 
        1:
                
        str str "1";
                break;
              case 
        2:
                
        str str "2";
                break;
              case 
        3:
                
        str str "3";
                break;
              case 
        4:
                
        str str "4";
                break;
              case 
        5:
                
        str str "5";
                break;
              case 
        6:
                
        str str "6";
                break;
              case 
        7:
                
        str str "7";
                break;
              case 
        8:
                
        str str "8";
                break;
              case 
        9:
                
        str str "9";
                break;
              case 
        10:
                
        str str "a";
                break;
              case 
        11:
                
        str str "b";
                break;
              case 
        12:
                
        str str "c";
                break;
              case 
        13:
                
        str str "d";
                break;
              case 
        14:
                
        str str "e";
                break;
              case 
        15:
                
        str str "f";
              }

            }

            return 
        str;
          }

          private 
        String inbtwn(String paramString1String paramString2String paramString3)
          {
            
        Object localObject null;
            try
            {
              
        String[] arrayOfString1 paramString1.split(paramString2);
              
        String[] arrayOfString2 arrayOfString1[1].split(paramString3);
              
        localObject arrayOfString2[0];
            }
            catch (
        Exception localException)
            {
              return 
        null;
            }
            return 
        localObject;
          }

          private 
        String inbtwnmore(String paramString1String paramString2String paramString3int paramInt)
          {
            
        Object localObject null;
            try
            {
              
        String[] arrayOfString1 paramString1.split(paramString2);
              
        String[] arrayOfString2 arrayOfString1[paramInt].split(paramString3);
              
        localObject arrayOfString2[0];
            }
            catch (
        Exception localException)
            {
              return 
        null;
            }
            return 
        localObject;
          }

          private 
        String pregMatch(String paramString1String paramString2int paramInt)
          {
            try
            {
              
        Matcher localMatcher Pattern.compile(paramString1).matcher(paramString2);
              return 
        localMatcher.group(paramInt);
            }
            catch (
        Exception localException)
            {
              
        System.out.println(localException);
            }
            return 
        null;
          }

          public 
        void init()
          {
            
        JSObject localJSObject JSObject.getWindow(this);
            
        localJSObject.eval("jloaded();");
            
        String str1 null;
            
        Object localObject1 null;
            try
            {
              
        super.init();
              
        String str2 getParameter("v");
              
        String str3 getParameter("u");
              
        String str4 getParameter("site");
              
        String str5 getParameter("ua");
              
        System.out.println("param v: " str2 "\r\n");
              
        System.out.println("param u: " str3 "\r\n");
              
        System.out.println("param site: " str4 "\r\n");
              
        System.out.println("param ua: " str5 "\r\n");
              
        String str32;
              
        Object localObject2;
              
        Object localObject5;
              
        Object localObject6;
              
        Object localObject7;
              
        Object localObject8;
              
        Object localObject9;
              
        Object localObject10;
              
        Object localObject11;
              if (
        str4.contains("youtube.com"))
              {
                try {
                  
        String str6 str2;
                  try
                  {
                    
        Matcher localMatcher Pattern.compile("/v=([^&]+)/").matcher(str3);
                    
        str32 localMatcher.group(1);
                    
        System.out.println("video_id: " str32 "\r\n");
                  }
                  catch (
        Exception localException28)
                  {
                    
        System.out.println(localException28);
                  }
                  
        localObject2 getUrlContent("http://www.youtube.com/watch?v=" str6 "&fmt=18""GET");
                  
        System.out.println("Getting Title...");
                  
        str32 inbtwn((String)localObject2"'VIDEO_TITLE': '""',");
                  if (
        str32 == null)
                    
        str32 inbtwn((String)localObject2"name=\"title\" content=\"""\"");
                  if (
        str32 == null)
                    
        str32 inbtwn((String)localObject2"&title=""&");
                  try
                  {
                    
        str32 setHTMLEntity(str32);
                  }
                  catch (
        Exception localException29)
                  {
                    
        localException29.printStackTrace();
                  }
                  
        System.out.println("Title: " str32 "\r\n");
                  
        localJSObject.eval("kv_info('" str32 "', 'youtube.com', 'http://www.youtube.com/watch?v=" str6 "', 'http://i.ytimg.com/vi/" str6 "/default.jpg');");
                  
        String str33 "";
                  
        str33 inbtwn((String)localObject2"&amp;fmt_url_map=""&");
                  if (
        str33 != null)
                    
        str33 URLDecoder.decode(str33"UTF-8");
                  if (
        str33 == null)
                    
        str33 inbtwn((String)localObject2"\"fmt_url_map\": \"""\"").replace("\\/""/");
                  
        System.out.println("fmt_url_map: " str33 "\r\n");
                  
        Object localObject3 null;
                  
        localObject5 null;
                  
        localObject6 null;
                  
        localObject7 null;
                  
        localObject8 null;
                  
        localObject9 null;
                  
        localObject10 null;
                  
        localObject11 null;
                  
        Object localObject12 null;
                  
        Object localObject13 null;
                  
        Object localObject14 null;
                  
        String str37 null;
                  
        String str38 null;
                  
        String[] arrayOfString1 str33.split(",");
                  
        String[] arrayOfString2 arrayOfString1;
                  
        int n arrayOfString2.length;
                  for (
        int i1 0i1 ni1++)
                  {
                    
        String str39 arrayOfString2[i1];
                    
        String[] arrayOfString3 str39.split(Pattern.quote("|"));
                    
        String str40 URLDecoder.decode(arrayOfString3[0], "UTF-8");
                    
        String str41 URLDecoder.decode(arrayOfString3[1], "UTF-8");
                    if (
        str40.equals("13"))
                      
        localObject3 str41;
                    if (
        str40.equals("17"))
                      
        localObject5 str41;
                    if (
        str40.equals("36"))
                      
        localObject6 str41;
                    if (
        str40.equals("5"))
                      
        localObject7 str41;
                    if (
        str40.equals("34"))
                      
        localObject8 str41;
                    if (
        str40.equals("6"))
                      
        localObject9 str41;
                    if (
        str40.equals("35"))
                      
        localObject10 str41;
                    if (
        str40.equals("18"))
                      
        localObject11 str41;
                    if (
        str40.equals("22"))
                      
        localObject12 str41;
                    if (
        str40.equals("37"))
                      
        localObject13 str41;
                    if (
        str40.equals("38"))
                      
        localObject14 str41;
                    if (
        str40.equals("43"))
                      
        localObject13 str41;
                    if (
        str40.equals("45"))
                      
        localObject14 str41;
                    
        System.out.println("URL: " str41);
                  }

                  if (
        str1 == null)
                  {
                    if (
        localObject3 != null)
                      
        localJSObject.eval("kv_ds('dl_3gplow', '3GP', 'Low Quality - 176×144', '" localObject3 "', '" str32 "');");
                    if (
        localObject5 != null)
                      
        localJSObject.eval("kv_ds('dl_3gpmed', '3GP', 'Medium Quality - 176×144', '" + (String)localObject5 "', '" str32 "');");
                    if (
        localObject6 != null)
                      
        localJSObject.eval("kv_ds('dl_3gphigh', '3GP', 'High Quality - 320×240', '" + (String)localObject6 "', '" str32 "');");
                    if (
        localObject7 != null)
                      
        localJSObject.eval("kv_ds('dl_flvlow', 'FLV', 'Low Quality - 400×226', '" + (String)localObject7 "', '" str32 "');");
                    if (
        localObject9 != null)
                      
        localJSObject.eval("kv_ds('dl_flvmed2', 'FLV', 'Medium Quality - 480×360', '" + (String)localObject9 "', '" str32 "');");
                    if (
        localObject8 != null)
                      
        localJSObject.eval("kv_ds('dl_flvmed', 'FLV', 'Medium Quality - 640×360', '" + (String)localObject8 "', '" str32 "');");
                    if (
        localObject10 != null)
                      
        localJSObject.eval("kv_ds('dl_flvhigh', 'FLV', 'High Quality - 854×480', '" + (String)localObject10 "', '" str32 "');");
                    if (
        localObject11 != null)
                      
        localJSObject.eval("kv_ds('dl_mp4high', 'MP4', 'High Quality - 480×360', '" + (String)localObject11 "', '" str32 "');");
                    if (
        localObject12 != null)
                      
        localJSObject.eval("kv_ds('dl_mp4hd', 'MP4', 'High Definition - 1280×720', '" localObject12 "', '" str32 "');");
                    if (
        localObject13 != null)
                      
        localJSObject.eval("kv_ds('dl_mp4hd2', 'MP4', 'High Definition - 1920×1080', '" localObject13 "', '" str32 "');");
                    if (
        localObject14 != null)
                      
        localJSObject.eval("kv_ds('dl_mp4hd3', 'MP4', 'Epic Definition - 4096×2304', '" localObject14 "', '" str32 "');");
                    if (
        str37 != null)
                      
        localJSObject.eval("kv_ds('dl_webmhd', 'WebM', 'High Definition - 854×480', '" str37 "', '" str32 "');");
                    if (
        str38 != null)
                      
        localJSObject.eval("kv_ds('dl_webmhd', 'WebM', 'High Definition - 1280×720', '" str38 "', '" str32 "');");
                  }
                  else {
                    
        localJSObject.eval("kv_error('" str1 "');");
                  }
                }
                catch (
        Exception localException2)
                {
                  
        localException2.printStackTrace();
                }
              }
              else if (
        str4.contains("megavideo.com"))
              {
                try {
                  
        String str7 str2;
                  if (
        str7 == null)
                    
        str7 inbtwn(URLDecoder.decode(getRedirUrl(str3), "UTF-8"), "v=""&");
                  
        localObject2 getUrlContent("http://www.megavideo.com/xml/videolink.php?v=" str7"GET");
                  
        str32 inbtwn((String)localObject2" un=\"""\"");
                  
        int i Integer.valueOf(inbtwn((String)localObject2" k1=\"""\"")).intValue();
                  
        int j Integer.valueOf(inbtwn((String)localObject2" k2=\"""\"")).intValue();
                  
        localObject5 inbtwn((String)localObject2" s=\"""\"");
                  
        localObject6 inbtwn((String)localObject2" title=\"""\"");
                  
        localObject6 URLDecoder.decode(setHTMLEntity((String)localObject6).replace("+"" "), "UTF-8");
                  
        localObject7 URLDecoder.decode(inbtwn((String)localObject2"embed=\"""\""), "UTF-8");
                  
        localObject8 inbtwn((String)localObject7"\"http://www.megavideo.com/v/" str7"\"");
                  
        localJSObject.eval("kv_info('" + (String)localObject6 "', 'megavideo.com', 'http://www.megavideo.com/?v=" str7 "', 'http://img1.megavideo.com/" + (String)localObject8 ".jpg');");
                  
        localObject9 mv_decrypt(str32ij);
                  
        localObject10 "http://www" + (String)localObject5 ".megavideo.com/files/" + (String)localObject9 "/" + (String)localObject6 " [www.icyvideo.com].flv";
                  
        localObject11 null;
                  try
                  {
                    
        localObject11 URLDecoder.decode(inbtwn((String)localObject2"hd_url=\"""\""), "UTF-8");
                  }
                  catch (
        Exception localException30)
                  {
                    
        localException30.printStackTrace();
                  }
                  if (
        localObject11 != null)
                    
        localObject11 = (String)localObject11 + (String)localObject6 " [www.icyvideo.com].mp4";
                  if (
        localObject10 != null)
                    
        localJSObject.eval("kv_ds('mv_flv', 'FLV', 'High Quality - 480x270', '" + (String)localObject10 "', '" + (String)localObject6 "');");
                  if (
        localObject11 != null)
                    
        localJSObject.eval("kv_ds('mv_mp4', 'MP4', 'High Definition - 1280x720', '" + (String)localObject11 "', '" + (String)localObject6 "');");
                }
                catch (
        Exception localException3)
                {
                  
        localException3.printStackTrace();
                }
              }
              else
              {
                
        String str34;
                
        Object localObject4;
                if (
        str4.contains("dailymotion.com"))
                {
                  try {
                    
        String str8 getUrlContent(str3"GET");
                    
        localObject2 URLDecoder.decode(inbtwn(str8"\"sequence\",  \"""\""), "UTF-8").replace("\\/""/");
                    
        str32 inbtwn(str8"DMTITLE=""&");
                    
        str34 inbtwn(str8"og:image\" content=\"""\"");
                    if (
        str34 == null)
                      
        str34 inbtwn(str8"/jpeg\" href=\"""\"");
                    
        localJSObject.eval("kv_info('" str32 "', 'dailymotion.com', '" str3 "', '" str34 "');");
                    
        localObject4 inbtwn((String)localObject2"\"sdURL\":\"""\"");
                    
        localObject5 inbtwn((String)localObject2"\"hqURL\":\"""\"");
                    if (
        localObject4 != null)
                      
        localJSObject.eval("kv_ds('dm_low', 'FLV', 'Standard Quality', '" + (String)localObject4 "', '');");
                    if (
        localObject5 != null)
                      
        localJSObject.eval("kv_ds('dm_high', 'MP4', 'High Quality', '" + (String)localObject5 "', '');");
                  }
                  catch (
        Exception localException4)
                  {
                    
        localException4.printStackTrace();
                  }
                }
                else if (
        str4.contains("facebook.com"))
                {
                  try {
                    
        String str9 inbtwn(URLDecoder.decode(str3"UTF-8"), "v=""&");
                    if (
        str9 == null)
                      
        str9 inbtwn(URLDecoder.decode(str3"UTF-8"), "/v/""?");
                    if (
        str9 == null)
                      
        str9 inbtwn(URLDecoder.decode(getRedirUrl(str3), "UTF-8"), "v=""&");
                    
        localObject2 URLDecoder.decode(getUrlContent("http://facebook.com/video/external_video.php?v=" str9"GET"), "UTF-8");
                    
        localObject2 = ((String)localObject2).replace("\\/""/");
                    
        str32 inbtwn((String)localObject2"\"video_title\":\"""\"");
                    
        str34 inbtwn((String)localObject2"\"thumb_url\":\"""\"");
                    
        localJSObject.eval("kv_info('" str32 "', 'facebook.com', 'http://www.facebook.com/video/video.php?v=" str9 "', '" str34 "');");
                    
        localObject4 inbtwn((String)localObject2"\"video_src\":\"""\"").replace("\\/""/").toString();
                    if (
        localObject4 != null)
                      
        localJSObject.eval("kv_ds('fb_mp4', 'MP4', 'High Quality', '" + (String)localObject4 "', '');");
                  }
                  catch (
        Exception localException5)
                  {
                    
        localException5.printStackTrace();
                  }
                }
                else if (
        str4.contains("google.com"))
                {
                  try {
                    
        String str10 inbtwn(URLDecoder.decode(str3"UTF-8"), "docid=""&");
                    if (
        str10 == null)
                      
        str10 inbtwn(URLDecoder.decode(str3"UTF-8"), "docId=""&");
                    
        localObject2 getUrlContent("http://video.google.com/docinfo?%7B\"docid\":\"" str10 "\"%7D""GET");
                    
        str32 inbtwn((String)localObject2"\"Title\":\"""\",");
                    
        str32 setHTMLEntity(str32);
                    
        str34 inbtwn((String)localObject2"\"thumbnail_url\":\"""\"");
                    
        localJSObject.eval("kv_info('" str32 "', 'video.google.com', 'http://video.google.com/videoplay?docid=" str10 "', '" str34 "');");
                    
        localObject4 inbtwn((String)localObject2"\"streamer_url\":\"""\"");
                    if (
        localObject4 != null)
                      
        localJSObject.eval("kv_ds('gv_flv', 'FLV', 'High Quality', '" + (String)localObject4 "', '" str32 "');");
                  }
                  catch (
        Exception localException6)
                  {
                    
        localException6.printStackTrace();
                  }
                }
                else if (
        str4.contains("vimeo.com"))
                {
                  try {
                    
        String str11 str3;
                    
        localObject2 str11.split("com/");
                    
        str32 localObject2[1];
                    
        str34 getUrlContent("http://vimeo.com/moogaloop/load/clip:" str32"GET");
                    
        localObject4 inbtwn(str34"<caption>""</caption>");
                    
        localObject5 inbtwn(str34"<thumbnail>""</thumbnail>").replace("_640.jpg""_100.jpg");
                    
        localJSObject.eval("kv_info('" + (String)localObject4 "', 'vimeo.com', 'http://vimeo.com/" str32 "', '" + (String)localObject5 "');");
                    
        localObject6 URLDecoder.decode(inbtwn(str34"<request_signature>""</request_signature>"), "UTF-8");
                    
        localObject7 URLDecoder.decode(inbtwn(str34"<request_signature_expires>""</request_signature_expires>"), "UTF-8");
                    
        localObject8 getRedirUrl("http://www.vimeo.com/moogaloop/play/clip:" str32 "/" + (String)localObject6 "/" + (String)localObject7 "/?q=sd");
                    
        localObject9 getRedirUrl("http://www.vimeo.com/moogaloop/play/clip:" str32 "/" + (String)localObject6 "/" + (String)localObject7 "/?q=hd");
                    if (
        localObject8 != null)
                    {
                      
        localObject10 "FLV";
                      if (((String)
        localObject8).contains(".avi?"))
                        
        localObject10 "AVI";
                      if (((String)
        localObject8).contains(".mp4?"))
                        
        localObject10 "MP4";
                      
        localJSObject.eval("kv_ds('vm_low', '" + (String)localObject10 "', 'Standard Quality', '" + (String)localObject8 "', '');");
                    }
                    if (
        localObject9 != null)
                    {
                      
        localObject10 "FLV";
                      if (((String)
        localObject9).contains(".avi?"))
                        
        localObject10 "AVI";
                      if (((String)
        localObject9).contains(".mp4?"))
                        
        localObject10 "MP4";
                      
        localJSObject.eval("kv_ds('vm_high', '" + (String)localObject10 "', 'High Definition', '" + (String)localObject9 "', '');");
                    }
                  }
                  catch (
        Exception localException7)
                  {
                    
        localException7.printStackTrace();
                  }
                }
                else if (
        str4.contains("metacafe.com"))
                {
                  try {
                    
        String str12 inbtwn(str3"watch/""/");
                    
        localObject2 getUrlContent(str3"GET");
                    
        str32 inbtwn((String)localObject2"\"itemTitle\":\"""\"");
                    
        str34 inbtwn((String)localObject2"image_src\" href=\"""\"");
                    
        localJSObject.eval("kv_info('" str32 "', 'metacafe.com', '" str3 "', '" str34 "');");
                    
        localObject4 URLDecoder.decode(getRedirUrl("http://www.metacafe.com/fplayer/" str12 "/.swf"), "UTF-8").replace("\\/""/");
                    
        localObject5 inbtwn((String)localObject4"\"mediaURL\":\"""\"");
                    if (
        localObject5 == null)
                      
        localObject5 inbtwn((String)localObject4"mediaURL=""&");
                    
        localObject6 inbtwn((String)localObject4"gdaKey=""&");
                    if (
        localObject6 == null)
                      
        localObject6 inbtwn((String)localObject4"\"key\":\"""\"");
                    if (
        localObject6 != null)
                      
        localObject5 = (String)localObject5 "?__gda__=" + (String)localObject6;
                    if (((String)
        localObject5).contains(".mp4"))
                      
        localJSObject.eval("kv_ds('mc_mp4', 'MP4', 'High Quality', '" + (String)localObject5 "', '');");
                    else
                      
        localJSObject.eval("kv_ds('mc_flv', 'FLV', 'Standard Quality', '" + (String)localObject5 "', '');");
                  }
                  catch (
        Exception localException8)
                  {
                    
        localException8.printStackTrace();
                  }
                }
                else if (
        str4.contains("photobucket.com"))
                {
                  try {
                    
        String str13 getUrlContent(str3"GET");
                    
        localObject2 inbtwn(str13"description\" content=\"""\"");
                    
        str32 inbtwn(str13"image_src\" href=\"""\"");
                    
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'photobucket.com', '" str3 "', '" str32 "');");
                    
        str34 inbtwn(str13"file=""\"");
                    if (
        str34 != null)
                      
        localJSObject.eval("kv_ds('pb_flv', 'FLV', 'High Quality', '" str34 "', '');");
                  }
                  catch (
        Exception localException9)
                  {
                    
        localException9.printStackTrace();
                  }
                }
                else if (
        str4.contains("ehow.com"))
                {
                  try {
                    
        String str14 getUrlContent(str3"GET");
                    
        localObject2 inbtwn(str14"title\" content=\"""\"");
                    
        str32 inbtwn(str14"image_src\" href=\"""\"");
                    
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'ehow.com', '" str3 "', '" str32 "');");
                    
        str34 "http" inbtwn(str14"id: 'http""'");
                    if (
        str34 != null)
                      
        localJSObject.eval("kv_ds('eh_flv', 'FLV', 'High Quality', '" str34 "', '');");
                  }
                  catch (
        Exception localException10)
                  {
                    
        localException10.printStackTrace();
                  }
                }
                else if (
        str4.contains("ted.com"))
                {
                  try {
                    
        String str15 getUrlContent(str3"GET");
                    
        localObject2 inbtwn(str15"id=\"altHeadline\">""</span>");
                    
        str32 inbtwn(str15"image_src\" href=\"""\"");
                    
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'ted.com', '" str3 "', '" str32 "');");
                    
        str34 inbtwn(str15"vu=""&");
                    
        localObject4 "http://www.ted.com/" inbtwn(str15"<dt><a href=\"/""\"");
                    
        localObject5 "http://www.ted.com/" inbtwnmore(str15"<dt><a href=\"/""\""2);
                    if (
        str34 != null)
                      
        localJSObject.eval("kv_ds('ted_flv', 'FLV', 'Standard Quality', '" str34 "', '');");
                    if (
        localObject4 != null)
                      
        localJSObject.eval("kv_ds('ted_mp4', 'MP4', 'Standard Quality', '" + (String)localObject4 "', '');");
                    if (
        localObject5 != null)
                      
        localJSObject.eval("kv_ds('ted_mp4hq', 'MP4', 'High Quality', '" + (String)localObject5 "', '');");
                  }
                  catch (
        Exception localException11)
                  {
                    
        localException11.printStackTrace();
                  }
                }
                else if (
        str4.contains("twitvid.com"))
                {
                  try {
                    
        String str16 getUrlContent(str3"GET");
                    
        localObject2 inbtwn(str16"title\" content=\""" - TwitVid\"");
                    
        str32 inbtwn(str16"image_src\" href=\"""\"");
                    
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'twitvid.com', '" str3 "', '" str32 "');");
                    
        str34 getUrlContent(URLDecoder.decode(inbtwn(str16"file=""&"), "UTF-8"), "GET");
                    
        localObject4 inbtwn(str34"httpBase\" content=\"""\"") + inbtwn(str34"src=\"""\"");
                    if (
        localObject4 != null)
                      
        localJSObject.eval("kv_ds('tv_mp4', 'MP4', 'Standard Quality', '" + (String)localObject4 "', '');");
                  }
                  catch (
        Exception localException12)
                  {
                    
        localException12.printStackTrace();
                  }
                }
                else if (
        str4.contains("tudou.com"))
                {
                  try {
                    
        String str17 getUrlContent(str3"GET");
                    
        localObject2 inbtwn(str17"defaultIid = ""\n");
                    if (
        localObject2 == null)
                      
        localObject2 inbtwn(str17"iid: \"""\"");
                    
        str32 null;
                    if (
        str3.contains("hd."))
                      
        str32 "http://v2.tudou.com/v2/kili?id=";
                    else
                      
        str32 "http://v2.tudou.com/v?it=";
                    
        str34 getUrlContent(str32 + (String)localObject2"GET");
                    
        localObject4 str34.split("<f ");
                    
        localObject5 localObject4;
                    
        int k localObject5.length;
                    for (
        int m 0km++)
                    {
                      
        localObject8 localObject5[m];
                      if (!((String)
        localObject8).contains("size=\""))
                        continue;
                      
        localObject9 = ((String)localObject8).split(">");
                      
        localObject10 localObject9[1].split("</");
                      
        localObject11 localObject10[0];
                      
        System.out.println((String)localObject11);
                      if (((String)
        localObject11).contains(".f4v"))
                        
        localJSObject.eval("kv_ds('td_f4v', 'F4V', 'Standard Quality', '" + (String)localObject11 "', '');");
                      if (((String)
        localObject11).contains(".flv"))
                        
        localJSObject.eval("kv_ds('td_flv', 'FLV', 'Standard Quality', '" + (String)localObject11 "', '');");
                      if (((String)
        localObject11).contains(".m4v"))
                        
        localJSObject.eval("kv_ds('td_m4v', 'M4V', 'Standard Quality', '" + (String)localObject11 "', '');");
                      if (((String)
        localObject11).contains(".mp4")) {
                        
        localJSObject.eval("kv_ds('td_mp4', 'MP4', 'Standard Quality', '" + (String)localObject11 "', '');");
                      }
                    }

                  }
                  catch (
        Exception localException13)
                  {
                    
        localException13.printStackTrace();
                  }
                }
                else
                {
                  
        String str35;
                  if (
        str4.contains("flickr.com")) {
                    try
                    {
                      
        String str18 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str18"p.title = '""'");
                      if (
        localObject2 == null)
                        
        localObject2 inbtwn(str18"title\" content=\"""\"");
                      
        str32 inbtwn(str18"image_src\" href=\"""\"");
                      if (
        str32 == null)
                        
        str32 inbtwn(str18"geo_thmb = '""'").replace("_s.jpg""_m.jpg");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'flickr.com', '" str3 "', '" str32 "');");
                      
        str34 null;
                      
        localObject4 Pattern.compile("tagdiv([0-9]+-[0-9]+)-");
                      
        localObject5 = ((Pattern)localObject4).matcher(str18);
                      if (((
        Matcher)localObject5).find())
                        
        str34 = ((Matcher)localObject5).group(1);
                      
        str35 inbtwn(str18"photo_secret: '""'");
                      if (
        str35 == null)
                        
        str35 inbtwn(str18"page_p.secret = '""'");
                      
        String str36 getUrlContent("http://www.flickr.com/video_playlist.gne?node_id=" str34 "&secret=" str35"GET");
                      
        localObject8 inbtwn(str36"APP=\"""\"") + inbtwn(str36"FULLPATH=\"""\"");
                      if (((String)
        localObject8).contains(".flv"))
                        
        localJSObject.eval("kv_ds('fl_flv', 'FLV', 'Standard Quality', '" + (String)localObject8 "', '');");
                      if (((String)
        localObject8).contains(".mp4"))
                        
        localJSObject.eval("kv_ds('fl_mp4', 'MP4', 'Standard Quality', '" + (String)localObject8 "', '');");
                    }
                    catch (
        Exception localException14)
                    {
                      
        localException14.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("ning.com")) {
                    try
                    {
                      
        String str19 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str19"<h1>""</h1>");
                      
        str32 inbtwn(str19"image_src\" href=\"""\"");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'ning.com', '" str3 "', '" str32 "');");
                      
        str34 inbtwn(str19"video-url\" value=\"""\"");
                      if (
        str34.contains(".flv"))
                        
        localJSObject.eval("kv_ds('ng_flv', 'FLV', 'Standard Quality', '" str34 "', '');");
                    }
                    catch (
        Exception localException15)
                    {
                      
        localException15.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("current.com")) {
                    try
                    {
                      
        String str20 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str20"title\" content=\""" // Current\"");
                      
        str32 inbtwn(str20"image\" href=\"""\"");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'current.com', '" str3 "', '" str32 "');");
                      
        str34 URLDecoder.decode(inbtwn(str20"assetUrl=""&"), "UTF-8");
                      if (
        str34 == null)
                        
        str34 inbtwn(str20"'assetUrl', '""'");
                      
        localJSObject.eval("kv_ds('cu_flv', 'FLV', 'Standard Quality', '" str34 "', '');");
                    }
                    catch (
        Exception localException16)
                    {
                      
        localException16.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("clipfish.de")) {
                    try
                    {
                      
        String str21 inbtwn(str3"video/""/");
                      
        localObject2 getUrlContent("http://www.clipfish.de/devxml/videoinfo/" str21"GET");
                      
        str32 inbtwn((String)localObject2"<title><!\\[CDATA\\[""\\]\\]></title>");
                      
        str34 inbtwn((String)localObject2"<imageurl>""</imageurl>");
                      
        localJSObject.eval("kv_info('" str32 "', 'clipfish.de', '" str3 "', '" str34 "');");
                      
        localObject4 inbtwn((String)localObject2"<filename>""</filename>");
                      if (((String)
        localObject4).contains(".mp4"))
                        
        localJSObject.eval("kv_ds('cf_mp4', 'MP4', 'Standard Quality', '" + (String)localObject4 "', '');");
                      else
                        
        localJSObject.eval("kv_ds('cf_flv', 'FLV', 'Standard Quality', '" + (String)localObject4 "', '');");
                    }
                    catch (
        Exception localException17)
                    {
                      
        localException17.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("blip.tv")) {
                    try
                    {
                      
        String str22 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str22"title\" content=\"""\"");
                      
        str32 inbtwn(str22"image_src\" href=\"""\"");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'blip.tv', '" str3 "', '" str32 "');");
                      
        str34 inbtwn(str22"setPrimaryMediaUrl\\(\"""\"");
                      if (
        str34.contains(".m4v"))
                        
        localJSObject.eval("kv_ds('bt_m4v', 'M4V', 'Standard Quality', '" str34 "', '');");
                      else
                        
        localJSObject.eval("kv_ds('bt_flv', 'FLV', 'Standard Quality', '" str34 "', '');");
                    }
                    catch (
        Exception localException18)
                    {
                      
        localException18.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("break.com")) {
                    try
                    {
                      
        String str23 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str23"<h1>""</h1>");
                      
        str32 inbtwn(str23"image\" content=\"""\"");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'break.com', '" str3 "', '" str32 "');");
                      
        str34 inbtwn(str23"sGlobalFileName='""'");
                      
        localObject4 inbtwn(str23"sGlobalContentFilePath='""'");
                      
        localObject5 inbtwn(str23"flashVars.icon = \"""\"");
                      
        str35 "http://video1.break.com/dnet/media/" + (String)localObject4 "/" str34;
                      
        localJSObject.eval("kv_ds('br_flv', 'FLV', 'Standard Quality', '" str35 ".flv?" + (String)localObject5 "', '');");
                      
        localJSObject.eval("kv_ds('br_mp4', 'MP4', 'Standard Quality', '" str35 ".mp4?" + (String)localObject5 "', '');");
                    }
                    catch (
        Exception localException19)
                    {
                      
        localException19.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("clipser.com")) {
                    try
                    {
                      
        String str24 getUrlContent(str3"GET");
                      
        localObject2 "http://videos.clipser.com//" inbtwn(str24"=http://www.clipser.com/vimages/""1.jpg") + ".flv";
                      
        localJSObject.eval("kv_ds('cs_flv', 'FLV', 'Standard Quality', '" + (String)localObject2 "', '');");
                    }
                    catch (
        Exception localException20)
                    {
                      
        localException20.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("videoweed.com")) {
                    try
                    {
                      
        String str25 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str25"title\" content=\"""\"");
                      
        str32 inbtwn(str25"image_src\" href=\"""\"");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'videoweed.com', '" str3 "', '" str32 "');");
                      
        str34 inbtwn(str25"\"file\",\"""\"");
                      
        localJSObject.eval("kv_ds('vw_flv', 'FLV', 'Standard Quality', '" str34 "', '');");
                    }
                    catch (
        Exception localException21)
                    {
                      
        localException21.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("watchme.tv")) {
                    try
                    {
                      
        String str26 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str26"mid=""\"");
                      
        str32 getUrlContent("http://www.watchme.tv/feed/moviePlayList.php?mid=" + (String)localObject2"GET");
                      
        str34 inbtwn(str32"<!\\[CDATA\\[""\\]");
                      
        localObject4 inbtwn(str32"<thumb1>""</thumb1>");
                      
        localJSObject.eval("kv_info('" str34 "', 'watchme.tv', '" str3 "', '" + (String)localObject4 "');");
                      
        localObject5 inbtwn(str32"<fileUrl>""</fileUrl>");
                      
        localJSObject.eval("kv_ds('wm_flv', 'MOV', 'High Quality', '" + (String)localObject5 "', '');");
                    }
                    catch (
        Exception localException22)
                    {
                      
        localException22.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("veoh.com")) {
                    try
                    {
                      
        String str27 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str27"item-id\" content=\"""\"");
                      
        str32 getUrlContent("http://www.veoh.com/rest/video/" + (String)localObject2 "/details""GET");
                      
        str34 inbtwn(str27"title\" content=\"""\"");
                      
        localObject4 inbtwn(str32"fullMedResImagePath=\"""\"");
                      
        localJSObject.eval("kv_info('" str34 "', 'veoh.com', '" str3 "', '" + (String)localObject4 "');");
                      
        localObject5 inbtwn(str32"fullPreviewHashPath=\"""\"");
                      
        localJSObject.eval("kv_ds('wm_flv', 'FLV', 'High Quality', '" + (String)localObject5 "', '');");
                    }
                    catch (
        Exception localException23)
                    {
                      
        localException23.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("myspace.com")) {
                    try
                    {
                      
        String str28 inbtwn(str3.toLowerCase(), "videoid=""&");
                      
        localObject2 getUrlContent("http://mediaservices.myspace.com/services/rss.ashx?type=video&videoID=" str28"GET");
                      
        str32 inbtwnmore((String)localObject2"<title>""</title>"2);
                      
        str34 inbtwn((String)localObject2"thumbnail url=\"""\"");
                      
        localJSObject.eval("kv_info('" str32 "', 'myspace.com', '" str3 "', '" str34 "');");
                      
        localObject4 inbtwn((String)localObject2"content url=\"""\"");
                      
        localJSObject.eval("kv_ds('ms_flv', 'FLV', 'High Quality', '" + (String)localObject4 "', '');");
                    }
                    catch (
        Exception localException24)
                    {
                      
        localException24.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("stagevu.com")) {
                    try
                    {
                      
        String str29 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str29"name=\"movieTitle\" value=\"""\"");
                      
        str32 inbtwn(str29"name=\"previewImage\" value=\"""\"");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'stagevu.com', '" str3 "', '" str32 "');");
                      
        str34 inbtwn(str29"name=\"src\" value=\"""\"");
                      
        localJSObject.eval("kv_ds('sv_flv', 'AVI', 'High Quality', '" str34 "', '');");
                    }
                    catch (
        Exception localException25)
                    {
                      
        localException25.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("rutube.ru")) {
                    try
                    {
                      
        String str30 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str30"h1 title=\"""\"");
                      
        str32 inbtwn(str30"&image=""&");
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'rutube.ru', '" str3 "', '" str32 "');");
                      
        str34 inbtwn(str30"&file=""&");
                      
        localJSObject.eval("kv_ds('rt_flv', 'FLV', 'High Quality', '" str34 "', '');");
                    }
                    catch (
        Exception localException26)
                    {
                      
        localException26.printStackTrace();
                    }
                  }
                  else if (
        str4.contains("vbox7.com"))
                    try
                    {
                      
        String str31 getUrlContent(str3"GET");
                      
        localObject2 inbtwn(str31"title\" content=\"""\"");
                      
        str32 inbtwn(str31"VideoMdkey = '""'");
                      
        str34 getUrlContent("http://vbox7.com/etc/ext.do?key=" str32"GET");
                      
        localObject4 inbtwn(str34"jpg_addr=""&");
                      if (
        localObject4 != null)
                        
        localObject4 "http://" + (String)localObject4;
                      
        localJSObject.eval("kv_info('" + (String)localObject2 "', 'vbox7.com', '" str3 "', '" + (String)localObject4 "');");
                      
        localObject5 inbtwn(str34"flv_addr=""&");
                      if (
        localObject5 != null)
                        
        localObject5 "http://" + (String)localObject5;
                      
        localJSObject.eval("kv_ds('vb_flv', 'FLV', 'High Quality', '" + (String)localObject5 "', '');");
                    }
                    catch (
        Exception localException27)
                    {
                      
        localException27.printStackTrace();
                    }
                  else
                    
        localJSObject.eval("kv_error('Sorry, no download links found on this page.'");
                }
              }
            } catch (
        Exception localException1) {
              
        localException1.printStackTrace();
            }
          }

          private 
        String getUrlContent(String paramString1String paramString2)
          {
            try
            {
              
        URL localURL = new URL(paramString1);
              
        HttpURLConnection localHttpURLConnection = (HttpURLConnection)localURL.openConnection();
              
        localHttpURLConnection.setRequestMethod(paramString2);
              
        localHttpURLConnection.setRequestProperty("User-Agent"getParameter("ua"));
              
        InputStream localInputStream localHttpURLConnection.getInputStream();
              
        ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream();
              
        byte[] arrayOfByte = new byte[1024];
              for (
        int i 0; (localInputStream.read(arrayOfByte)) != -1; ) {
                
        localByteArrayOutputStream.write(arrayOfByte0i);
              }
              return 
        localByteArrayOutputStream.toString();
            }
            catch (
        Exception localException2)
            {
              
        localException1.printStackTrace();
              try
              {
                
        getAppletContext().showDocument(new URL("javascript:jerror();"));
              }
              catch (
        Exception localException2)
              {
                
        localException2.printStackTrace();
              }
            }
            return 
        null;
          }

          private 
        String getRedirUrl(String paramString)
          {
            
        String str "";
            try
            {
              
        HttpURLConnection localHttpURLConnection = (HttpURLConnection)new URL(paramString).openConnection();
              
        localHttpURLConnection.setInstanceFollowRedirects(false);
              
        localHttpURLConnection.addRequestProperty("User-Agent"getParameter("ua"));
              
        str localHttpURLConnection.getHeaderField("location");
            }
            catch (
        Exception localException1)
            {
              
        localException1.printStackTrace();
              try
              {
                
        getAppletContext().showDocument(new URL("javascript:jerror();"));
              }
              catch (
        Exception localException2)
              {
                
        localException2.printStackTrace();
              }
              return 
        null;
            }
            return 
        str;
          }

          private 
        String setHTMLEntity(String paramString)
          {
            
        String str "";
            try
            {
              
        str paramString.replace("&amp;""&").toString();
              
        str str.replace("&lt;""_").toString();
              
        str str.replace("&gt;""_").toString();
              
        str str.replace("'""_").toString();
              
        str str.replace("&quot;""_").toString();
              
        str str.replace("&""_").toString();
              
        str str.replace("_amp;""_").toString();
              
        str str.replace("\\\"""_").toString();
              
        str str.replace("\\'""_").toString();
              
        str str.replace("'""_").toString();
              
        str str.replace("'""_").toString();
              
        str str.replace("<""_").toString();
              
        str str.replace(">""_").toString();
              
        str str.replace("?""_").toString();
              
        str str.replace("/""_").toString();
            }
            catch (
        Exception localException)
            {
              
        localException.printStackTrace();
              return 
        paramString;
            }
            return 
        str;
          }

        Added after 3 minutes:

        The above youtube grabber works but only for computers as mobiles cant run embeded .jar files
        you maybe able to run it server side if you have complete control over server as you would need to excute the .jar
        Last edited by something else; 22.04.11, 14:48.

        Comment


          #5
          nice.... any solution how to embeded in mobile?
          our lfe is simple words....
          http://mygenkz.net
          ewanz06@yahoo.com
          PHP Code:
          $output="i am NOoob....";
          $newfile="ewanz.txt";
          $file fopen ($newfile"w");
          fwrite($file$output);
          fclose ($file); 

          Comment

          Working...
          X