It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn't find one. Please enter the address of your feed to validate.

Source: http://1conv.com/seo/youtube2mp3/1

  1. <!DOCTYPE html>
  2.  
  3. <html ng-app="mainApp" xmlns="http://www.w3.org/1999/xhtml">
  4.  
  5. <head>
  6.    <meta charset="utf-8" />
  7.    <meta content="IE=edge" http-equiv="X-UA-Compatible" />
  8.    <meta content="youtube to mp3, youtube to mp3 converter" name="keywords" />
  9.    <meta content="flvto.video, youtube to mp3 converter with subtitles online. it only costs 10-15 seconds for convert to m4a process. we can convert YouTube video to real highest quality mp3 and m4a file with subtitles easily." data-i18n="[content]youtube2mp3flvto.description" name="description" />
  10.  
  11.    <title>youtube to mp3 flvto</title>
  12.    <meta content="width=device-width" name="viewport" />
  13.    <base href="/" />
  14.    <style>
  15.        /* Critical Path CSS Generated by Pegasaas Accelerator at https://pegasaas.com/critical-path-css-generator/ for https://1conv.com/en/youtube-to-mp3 */
  16.        html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a{background-color:transparent}svg:not(:root){overflow:hidden}button,input{margin:0;font:inherit;color:inherit}button{overflow:visible}button{text-transform:none}button{-webkit-appearance:button}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}@font-face{font-display: swap;font-family:'Glyphicons Halflings';src:url(https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot);src:url(https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.woff) format('woff'),url(https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-pencil:before{content:"\270f"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-arrow-down:before{content:"\e094"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}h2,h3,h4{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h2,h3{margin-top:20px;margin-bottom:10px}h4{margin-top:10px;margin-bottom:10px}h2{font-size:30px}h3{font-size:24px}h4{font-size:18px}ol,ul{margin-top:0;margin-bottom:10px}.list-unstyled{padding-left:0;list-style:none}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-6,.col-md-10,.col-md-2,.col-md-5,.col-md-8,.col-sm-12,.col-sm-6,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-12{float:left}.col-xs-12{width:100%}@media (min-width:768px){.col-sm-12,.col-sm-6{float:left}.col-sm-12{width:100%}.col-sm-6{width:50%}}@media (min-width:992px){.col-md-10,.col-md-2,.col-md-5,.col-md-8{float:left}.col-md-10{width:83.33333333%}.col-md-8{width:66.66666667%}.col-md-5{width:41.66666667%}.col-md-2{width:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}}@media (min-width:1200px){.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-6{float:left}.col-lg-6{width:50%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-offset-3{margin-left:25%}}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;background-image:none;border:1px solid transparent;border-radius:4px}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.input-group{position:relative;display:table;border-collapse:separate}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.input-group .form-control,.input-group-btn{display:table-cell}.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-btn:last-child>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn:last-child>.btn{z-index:2;margin-left:-1px}.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.row:after,.row:before{display:table;content:" "}.clearfix:after,.container-fluid:after,.row:after{clear:both}@-ms-viewport{width:device-width}
  17.    </style>
  18.    <link as="style" href="/res/css/bootstrap-3.3.7/bootstrap.min.css" onload="this.onload=null;this.rel='stylesheet'" rel="preload" />
  19.    <noscript></noscript><link href="/res/css/bootstrap-3.3.7/bootstrap.min.css" rel="stylesheet" />
  20.    <link as="font" crossorigin="anonymous" href="/res/css/fonts/glyphicons-halflings-regular.woff2" rel="preload" />
  21.    <link as="font" crossorigin="anonymous" href="/res/css/fonts/glyphicons-halflings-regular.woff" rel="preload" />
  22.    <link as="font" crossorigin="anonymous" href="/res/css/fonts/glyphicons-halflings-regular.ttf" rel="preload" />
  23.  
  24.    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
  25.  
  26.  
  27.    <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  28.  
  29.    <!-- Global site tag (gtag.js) - Google Analytics -->
  30.    <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-121119583-1"></script>
  31.    <script>
  32.        window.dataLayer = window.dataLayer || [];
  33.  
  34.        function gtag() {
  35.            dataLayer.push(arguments);
  36.        }
  37.  
  38.        gtag('js', new Date());
  39.        gtag('set', {'user_id': 'USER_ID'}); // 使用已登录的 user_id 来设置用户 ID。
  40.        gtag('config', 'UA-121119583-1');
  41.    </script>
  42.  
  43.  
  44.  
  45.    <style>
  46.        .bs-callout {
  47.            padding: 20px;
  48.            margin: 20px 0;
  49.            border: 1px solid #eee;
  50.            border-left-width: 5px;
  51.            border-radius: 3px;
  52.        }
  53.  
  54.        .colorSet{
  55.            background: #1e1e1e;
  56.            color: #808080
  57.        }
  58.  
  59.  
  60.  
  61.        .li {
  62.            font-size: large;
  63.            margin-bottom: 30px;
  64.        }
  65.  
  66.        .title {
  67.            text-align: center;
  68.            color: #5e7d00
  69.        }
  70.  
  71.        .cell {
  72.  
  73.            height: 100px;
  74.            line-height: 100px;
  75.        }
  76.  
  77.        .wrapper {
  78.            width: 100%;
  79.        }
  80.        .center{
  81.            display:table;
  82.            margin:0 auto;
  83.            width: 100%;
  84.            /*border:1px solid red;*/
  85.        }
  86.  
  87.    </style>
  88.    <link href="/tr/youtube-to-mp3" hreflang="tr" rel="alternate" />
  89.    <link href="/ms/youtube-to-mp3" hreflang="ms" rel="alternate" />
  90.    <link href="/vi/youtube-to-mp3" hreflang="vi" rel="alternate" />
  91.    <link href="/pa/youtube-to-mp3" hreflang="pa" rel="alternate" />
  92.    <link href="/hi/youtube-to-mp3" hreflang="hi" rel="alternate" />
  93.    <link href="/id/youtube-to-mp3" hreflang="id" rel="alternate" />
  94.    <link href="/ar/youtube-to-mp3" hreflang="ar" rel="alternate" />
  95.    <link href="/de/youtube-to-mp3" hreflang="de" rel="alternate" />
  96.    <link href="/ru/youtube-to-mp3" hreflang="ru" rel="alternate" />
  97.    <link href="/fr/youtube-to-mp3" hreflang="fr" rel="alternate" />
  98.    <link href="/ko/youtube-to-mp3" hreflang="ko" rel="alternate" />
  99.    <link href="/la/youtube-to-mp3" hreflang="la" rel="alternate" />
  100.    <link href="/pt/youtube-to-mp3" hreflang="pt" rel="alternate" />
  101.    <link href="/ja/youtube-to-mp3" hreflang="ja" rel="alternate" />
  102.    <link href="/es/youtube-to-mp3" hreflang="es" rel="alternate" />
  103.    <link href="/it/youtube-to-mp3" hreflang="it" rel="alternate" />
  104.    <link href="/en/youtube-to-mp3" hreflang="en" rel="alternate" />
  105.    <link href="/zh-CN/youtube-to-mp3" hreflang="zh-CN" rel="alternate" />
  106.    <link href="/zh/youtube-to-mp3" hreflang="zh" rel="alternate" />
  107.    <link href="/en/youtube-to-mp3" hreflang="x-default" rel="alternate" />
  108.  
  109. </head>
  110. <body>
  111.  
  112. <div class="container-fluid">
  113.  
  114.  
  115.  
  116.  
  117.  
  118.    <div class="row">
  119.        <div ng-include="'./angular/temp/nav.html'"></div>
  120.    </div>
  121.  
  122.  
  123.    <!--adskeeper show ad desktop-->
  124.    <div class="row">
  125.  
  126.  
  127.        <!-- Composite Start -->
  128.        <div id="M722185ScriptRootC1155727">
  129.        </div>
  130.        <script async="" src="https://jsc.adskeeper.co.uk/f/l/flvto.video.1155727.js">
  131.        </script>
  132.        <!-- Composite End -->
  133.    </div>
  134.  
  135.    <!--adskeeper show ad mobile-->
  136.    
  137.  
  138.  
  139.  
  140.    <div class="row">
  141.        <div class="clearfix" style="margin-bottom : 50px ;"></div>
  142.        <div class="col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1">
  143.            <div class="input-group input-group-lg ">
  144.                <input class="form-control youtubeUrl " placeholder="Paste link here.. e.g. https://www.youtube.com/watch?v=EKF6ghfcQic" style=" border-color:#2e6da4 ;" type="text" />
  145.  
  146.                <span class="input-group-btn">
  147.  
  148.  
  149.                    <button class="btn btn-primary" name="convert" style="width: 200px" type="button"><i class="glyphicon glyphicon-refresh"> </i>
  150.                                          &nbsp;&nbsp;<span data-i18n="youtube2mp3.span1">convert</span>
  151.  
  152.  
  153.  
  154.                    </button>
  155.             </span>
  156.            </div>
  157.  
  158.        </div>
  159.  
  160.        <div class="clearfix" style="margin-bottom : 20px ;"></div>
  161.  
  162.  
  163.        <div class="row progressState " style="visibility:hidden;">
  164.  
  165.            <div class="col-lg-9 col-lg-offset-3  col-md-10 col-md-offset-1 ">
  166.                <div class=" col-sm-12 col-md-4 col-lg-3 fast">
  167.                    <img alt="" name="thumbnail" src="" style="width: 100%" />
  168.                </div>
  169.                <div class="col-sm-12 col-md-8 col-lg-5 ">
  170.                    <div class="fast" name="video-title" style=" font-size: large;font-weight:bolder"></div>
  171.                    <div class="fast" name="duration" style=" font-size: large;"></div>
  172.  
  173.                    <div class="clearfix" style="margin-bottom : 15px ;"></div>
  174.  
  175.  
  176.  
  177.                    <div class="alert alert-success no-fast" name="loader" role="alert" style=" display: none">
  178.                        <p align="center"><span name="progressTitle"> </span>&nbsp;&nbsp;&nbsp;<span name="myPersent"></span></p>
  179.                        <div class="progress">
  180.                            <div aria-valuemax="100" aria-valuemin="0" aria-valuenow="1" class="progress-bar progress-bar-striped active" name="progress" role="progressbar" style="width: 1%">
  181.                                <span class="sr-only" name="progress-sr">1% Complete</span>
  182.                            </div>
  183.                        </div>
  184.  
  185.                    </div>
  186.  
  187.  
  188.  
  189.                    <a class="btn btn-warning btn-lg no-fast" href="javascript:void(0)" name="download" onclick="downloadFile(this)" role="button" style="width: 320px ;height:40px; display: none">
  190.                        <i class="glyphicon glyphicon-arrow-down"></i><span>Best mp3 download</span>
  191.                    </a>
  192.  
  193.                    <div class="clearfix" style="margin-bottom : 15px ;"></div>
  194.  
  195.  
  196.  
  197.                    <a class="btn btn-warning btn-lg fast" name="download-fast" onclick="fastAutoDownloadFileWatch(this)" role="button" style="width: 320px ;height:40px; display: none" target="_blank">
  198.                        <i class="glyphicon glyphicon-arrow-down"></i> <span>Best m4a download autosave</span>
  199.  
  200.                    </a>
  201.  
  202.                    <div class="clearfix" style="margin-bottom : 15px ;"></div>
  203.  
  204.  
  205.                    <a class="btn btn-warning btn-lg fast" name="download-fast-hand" onclick="fastHandDownloadFileWatch(this)" role="button" style="width: 320px ;height:40px; display: none" target="_blank">
  206.                        <i class="glyphicon glyphicon-arrow-down"></i> <span>Best m4a download Manual save</span>
  207.  
  208.                    </a>
  209.  
  210.                </div>
  211.  
  212.  
  213.            </div>
  214.        </div>
  215.  
  216.  
  217.  
  218.  
  219.    </div>
  220.  
  221.    
  222.  
  223.    <div class="row" name="AD">
  224.        <div class="col-lg-3 col-lg-offset-3  col-md-10 col-md-offset-1 col-xs-12 col-sm-6">
  225.            <style>
  226.                #M722185ScriptRootC1152744 {
  227.                    min-height: 300px;
  228.                }
  229.            </style>
  230.            <!-- Composite Start -->
  231.            <div id="M722185ScriptRootC1152744"></div>
  232.            <script async="" src="https://jsc.adskeeper.co.uk/f/l/flvto.video.1152744.js"></script>
  233.            <!-- Composite End -->
  234.  
  235.  
  236.        </div>
  237.  
  238.        <div class="col-lg-3   col-md-5  col-xs-12 col-sm-6">
  239.            <div class="center googleAD">
  240.  
  241.                <style> #M722185ScriptRootC1155722 { min-height: 300px; }</style>
  242.                <!-- Composite Start -->
  243.                <div id="M722185ScriptRootC1155722">
  244.                </div>
  245.                <script async="" src="https://jsc.adskeeper.co.uk/f/l/flvto.video.1155722.js">
  246.                </script>
  247.                <!-- Composite End -->
  248.  
  249.            </div>
  250.  
  251.  
  252.        </div>
  253.  
  254.  
  255.  
  256.  
  257.    </div>
  258.  
  259.    <!--adskeeper.com start-->
  260.  
  261.    <!-- Composite Start mobile site-->
  262.    <div id="M722185ScriptRootC1155724">
  263.    </div>
  264.    <script async="" src="https://jsc.adskeeper.co.uk/f/l/flvto.video.1155724.js">
  265.    </script>
  266.    <!-- Composite End -->
  267.  
  268.  
  269.  
  270.    <!--adskeeper.com End-->
  271.  
  272.  
  273.    <div class="row  no-fast progressState " name="no-fast-downloadHint" style=" display: none">
  274.  
  275.        <div class="col-lg-4 col-lg-offset-4 col-md-10 col-md-offset-1 col-xs-12 col-sm-12">
  276.            <div class="clearfix" style="margin-bottom : 20px ;"></div>
  277.  
  278.            <div class="list-group" name="download-hint">
  279.  
  280.                <a class="list-group-item" href="#" style=" font-size: large;font-weight:bolder">
  281.                    Here we support two formats of audio. Usually, the m4a's quality is higher than mp3. but if the video has subtitles,
  282.                    our mp3 format will contain it.
  283.                    <i class="fa fa-cog fa-spin"></i>
  284.                </a>
  285.            </div>
  286.        </div>
  287.    </div>
  288.    <div class="row" name="download-method">
  289.  
  290.  
  291.        <div class="col-lg-3 col-lg-offset-3  col-md-6 col-md-offset-1 col-xs-12 col-sm-12">
  292.            <div class=" colorSet bs-callout">
  293.  
  294.                <h3>youtube to mp3:</h3>
  295.                <p data-i18n="youtube2mp3flvto.p1" style="font-size: medium;color: #5e7d00;font-weight:bold;">youtube to mp3 converter with subtitles online. it only costs 5-10 seconds for convert to m4a process. we can convert YouTube video to real highest quality mp3 and m4a file with subtitles easily.</p>
  296.  
  297.  
  298.  
  299.            </div>
  300.        </div>
  301.  
  302.      
  303.  
  304.  
  305.    </div>
  306.  
  307.    <div class="row" name="download-method">
  308.        <div class="col-lg-6 col-lg-offset-3 col-md-10 col-md-offset-1 col-xs-12 col-sm-12 ">
  309.            <div class="clearfix" style="margin-bottom : 15px ;"></div>
  310.  
  311.            <div class="alert alert-success alert-dismissible" role="alert">
  312.                <button aria-label="Close" class="close" data-dismiss="alert" type="button"><span aria-hidden="true">&times;</span></button>
  313.  
  314.                <p style="font-size: large"><strong>Best m4a download autosave</strong> means you can save the file by clicking the button, but it may not be successful.</p>
  315.                <p style="font-size: large"><strong>Best m4a download Manual save</strong> means that the file must be saved manually. the way is:</p>
  316.                <p style="font-size: large"><strong>On Mobile:</strong> Touch the button and hold until the menu appears, choose 'Download Link'.  </p>
  317.                <p style="font-size: large"><strong>On Desktop:</strong> Right-click the download button, choose 'Save link as...' or 'Download link as...' option. </p>
  318.            </div>
  319.        </div>
  320.    </div>
  321.  
  322.  
  323.  
  324.    <div class="row">
  325.  
  326.        <div class="col-lg-4 col-lg-offset-3  col-md-8 col-md-offset-1  col-sm-12 col-xs-12">
  327.  
  328.  
  329.  
  330.  
  331.            <div class=" colorSet bs-callout">
  332.  
  333.                <h1 class="title">youtube to mp3 converter</h1>
  334.                <ul class="list-unstyled">
  335.                    <li class="li"><span aria-hidden="true" class="glyphicon glyphicon-pencil"></span>
  336.                        <span data-i18n="youtube2mp3flvto.p2">
  337.                        Our converter can easily convert YouTube videos to mp3 (audio) file and download for free.
  338.                        We also support subtitles. If the language is not what you want, you can change the language code on the URL. for example. if you want to download English, open
  339.                        </span>
  340.                        <span>
  341.                            <a href="/en/youtube-to-mp3">https://flvto.video/en/youtube-to-mp3</a>
  342.                        </span>
  343.  
  344.                    </li>
  345.  
  346.                    <li class="li"><span aria-hidden="true" class="glyphicon glyphicon-pencil"></span>
  347.                        <span data-i18n="youtube2mp3flvto.p3">
  348.                        This service works for computers, tablets and mobile devices. The videos are always converted in real highest quality.
  349.                            You copy the URL or share link of the video, click the "convert" button, we give you what you want.
  350.                        </span>
  351.                    </li>
  352.  
  353.  
  354.                    <li class="li"><span aria-hidden="true" class="glyphicon glyphicon-pencil"></span>
  355.                        <span data-i18n="[html]youtube2mp3flvto.p4">
  356.                        By using our service you are accepting our <a href="/how-to/terms/" rel="nofollow" target="_blank">terms of use .</a>
  357.                        </span>
  358.                        <span data-i18n="youtube2mp3flvto.p5">
  359.                       Please comply with the laws of your country. Our service is free and needn't any software or register.
  360.                            We hope you like our service. Enjoy!
  361.                        </span>
  362.                    </li>
  363.  
  364.                </ul>
  365.            </div>
  366.        </div>
  367.  
  368.  
  369.  
  370.        <div class="col-lg-2 col-md-2 googleAD col-sm-12 col-xs-12">
  371.            <div class="clearfix" style="margin-bottom : 20px ;"></div>
  372.  
  373.            <!-- Composite Start -->
  374.            <div id="M722185ScriptRootC1155721">
  375.            </div>
  376.            <script async="" src="https://jsc.adskeeper.co.uk/f/l/flvto.video.1155721.js">
  377.            </script>
  378.            <!-- Composite End -->
  379.  
  380.  
  381.        </div>
  382.  
  383.    </div>
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.    <!-- Modal add favorite -->
  393.    <div aria-hidden="true" aria-labelledby="exampleModalCenterTitle" class="modal fade " id="exampleModalCenter" role="dialog" tabindex="-1">
  394.  
  395.        <div class="modal-dialog modal-dialog-centered " role="document">
  396.            <div class="modal-content">
  397.                <div class="modal-header">
  398.                    <h5 class="modal-title" id="exampleModalCenterTitle">Message</h5>
  399.                </div>
  400.                <div class="modal-body ">
  401.                    <div class="alert-success">
  402.                        <p>Would you please add the webpage to favorite? </p>
  403.                        <p>On PC browser,you can use <strong>Ctrl+D , or Command+D</strong> .</p>
  404.                        <p>On android chrome, tap More <span aria-hidden="true" class="glyphicon glyphicon-option-vertical"></span> <span aria-hidden="true" class="glyphicon glyphicon-menu-right"></span>
  405.                            Star<span aria-hidden="true" class="glyphicon glyphicon-star"></span> .</p>
  406.                        <p>On iphone chrome,tap More <span aria-hidden="true" class="glyphicon glyphicon-option-horizontal"></span>  <span aria-hidden="true" class="glyphicon glyphicon-menu-right"></span>
  407.                            Bookmark <img alt="Bookmark" height="18" src="//lh3.googleusercontent.com/bX5ECPGxuhalf12GTJBTvyy1JCpufcHSYQu4ZN3BnUAnRxeErcJ2fvWH2_xV-uhgsw=w18-h18" title="Bookmark" width="18" />.</p>
  408.                        <p>After adding, the message is no longer displayed.</p>
  409.                    </div>
  410.                </div>
  411.                <div class="modal-footer">
  412.                    <button class="btn btn-primary" onclick="addFavorite()" type="button">Yes, i promise to add favorite</button>
  413.                    <button class="btn btn-secondary" data-dismiss="modal" onclick="rejectAddFavorite()" type="button">No, i reject</button>
  414.                </div>
  415.            </div>
  416.        </div>
  417.    </div>
  418.  
  419. </div>
  420.  
  421. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
  422.  
  423. <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.min.js"></script>
  424. <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/i18next/11.3.2/i18next.min.js"></script>
  425. <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-i18next/1.2.1/jquery-i18next.min.js"></script>
  426. <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/i18next-xhr-backend/1.5.1/i18nextXHRBackend.min.js"></script>
  427. <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/i18next-browser-languagedetector/2.2.3/i18nextBrowserLanguageDetector.min.js"></script>
  428. <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  429. <script type="text/javascript">
  430.  
  431.  
  432.    var baseHref = getNoParaUrl();
  433.  
  434.    function createLink(cssURL) {
  435.        var head = $($('head')[0]),
  436.            linkTag = null;
  437.        if (!cssURL) {
  438.            return false;
  439.        }
  440.        linkTag = $('<link href="' + cssURL + '" rel="canonical"  />');
  441.        head.append(linkTag);
  442.    }
  443.  
  444.    var canonicalHref = getNoParaUrl();
  445.    createLink(canonicalHref);
  446.  
  447.    function getNoParaUrl() {
  448.        var url = document.location.toString();
  449.        var arrUrl = url.split("?");
  450.        var noParaUrl = arrUrl[0];
  451.        return noParaUrl;
  452.    }
  453.  
  454.    var progress= $("div[name='progress']");
  455.    var progressSr= $("span[name='progress-sr']");
  456.    var progressTitle= $("span[name='progressTitle']");
  457.    var myPersent= $("span[name='myPersent']");
  458.    var lastProgressEnd=false;
  459.    var lastProgressIntervalTime=100;
  460.  
  461.  
  462.  
  463.    function progress1() {
  464.        progress.css('visibility',"visible");
  465.        progressTitle.text("initialize");
  466.        var width = 1;
  467.        /*从1%开始*/
  468.        var run = setInterval(frame, 100);
  469.  
  470.        function frame() {
  471.            if (width >= 20) { /*超过100%消除定时器*/
  472.                clearInterval(run);
  473.            } else {
  474.                width++;
  475.                progress. css('width', width+ '%');
  476.                progress. attr('aria-valuenow', width);
  477.                progressSr. text( width+ '% Complete');
  478.                myPersent. text( width+ '%');
  479.            }
  480.        }
  481.    }
  482.  
  483.    function progress2() {
  484.        progressTitle.text("checking video");
  485.        var width = 20;
  486.        /*从1%开始*/
  487.        var run = setInterval(frame, 100);
  488.        function frame() {
  489.            if (width >= 40) { /*超过100%消除定时器*/
  490.                clearInterval(run);
  491.            } else {
  492.                width++;
  493.                progress. css('width', width+ '%');
  494.                progress. attr('aria-valuenow', width);
  495.                progressSr. text( width+ '% Complete');
  496.                myPersent. text( width+ '%');
  497.  
  498.            }
  499.        }
  500.    }
  501.  
  502.    function progress3() {
  503.  
  504.        progressTitle.text("loading video");
  505.        var width = 40;
  506.        /*从1%开始*/
  507.        var run = setInterval(frame, 100);
  508.  
  509.        function frame() {
  510.            if (width >= 60) { /*超过100%消除定时器*/
  511.                progress.css('visibility',"hidden");
  512.                progress.css('width',  '0%');
  513.                clearInterval(run);
  514.            } else {
  515.                width++;
  516.                progress. css('width', width+ '%');
  517.                progress. attr('aria-valuenow', width);
  518.                progressSr. text( width+ '% Complete');
  519.                myPersent. text( width+ '%');
  520.            }
  521.        }
  522.    }
  523.  
  524.  
  525.    function lastProgress() {
  526.  
  527.  
  528.        progress.css('visibility',"hidden");
  529.        var width = 30;
  530.        progressTitle.text("converting video");
  531.        progress.addClass  ("progress-bar-success");
  532.        progress.css('visibility',"visible");
  533.  
  534.        // visibility
  535.  
  536.        /*从1%开始*/
  537.        var run = setInterval(frame, lastProgressIntervalTime);
  538.  
  539.        function frame() {
  540.            // console.log(lastProgressEnd);
  541.            if (width >=90||lastProgressEnd) { /*超过100%消除定时器*/
  542.  
  543.                clearInterval(run);
  544.            } else {
  545.                //经测算1分钟长度的1080p 电影对应每interval(100ms) 进10的进度,30=duration ,进度速度根据实际做调整
  546.                var videoDuration= $("div[name='duration']").children("span").text();
  547.                width=width+0.5/countLastProgress(videoDuration);
  548.                // width=width+1/3;
  549.                progress. css('width', width+ '%');
  550.                progress. attr('aria-valuenow', width);
  551.                progressSr. text( width+ '% Complete');
  552.                myPersent. text(Math.round(width) + '%');
  553.  
  554.            }
  555.        }
  556.    }
  557.  
  558.    
  559.  
  560.    function countLastProgress(duration) {
  561.        var minutes;
  562.  
  563.        if (duration.indexOf(":") == -1) {
  564.            return 1;
  565.        }
  566.        else {
  567.            var len =duration.split(":").length-1
  568.            if(len==1){
  569.                minutes=parseInt(duration.split(":")[0]);
  570.            }else {
  571.                minutes=60* parseInt(duration.split(":")[0])+parseInt(duration.split(":")[1]);
  572.            }
  573.            return minutes;
  574.        }
  575.  
  576.    }
  577.    function initProgress() {
  578.        //放到convert 点击后
  579.        lastProgressEnd=false;
  580.        progress.css('visibility',"hidden");
  581.        progress.removeClass("progress-bar-success");
  582.        progress. css('width',  '1%');
  583.    }
  584.  
  585.  
  586.    function showLoader() {
  587.        initProgress();
  588.        progress1();
  589.  
  590.        setTimeout(function(){
  591.  
  592.            progress2()
  593.        }, 2000);
  594.        setTimeout(function(){
  595.  
  596.            progress3()
  597.        }, 4000);
  598.  
  599.        setTimeout(function(){
  600.  
  601.            lastProgress()
  602.        }, 7000);
  603.    }
  604.  
  605.  
  606.    function createLink(cssURL){
  607.        var head = $($('head')[0]),
  608.            linkTag = null;
  609.        if(!cssURL){
  610.            return false;
  611.        }
  612.        linkTag = $('<link href="' + cssURL + '" rel="canonical"  />');
  613.        head.append(linkTag);
  614.    }
  615.  
  616.    var canonicalHref=getNoParaUrl();
  617.    createLink(canonicalHref);
  618.  
  619.    $("button[name='convert']").click(function () {
  620.  
  621.        // showModal();
  622.  
  623.        gtag('event', 'convert', {
  624.            'event_category' : 'convert-'+document.URL,
  625.            'event_label' : 'convert-'+document.URL ,
  626.            'value': '1'
  627.        });
  628.  
  629.  
  630.        console.log(i18next.language);
  631.        var language = "en";
  632.        if (typeof(i18next.language) != "undefined" && i18next.language != null && !isNull(i18next.language)) {
  633.            language = i18next.language;
  634.        }
  635.        var url = $(".youtubeUrl").val().trim();
  636.  
  637.  
  638.            if (url.length == 0) {
  639.            alert("need a effective url ");
  640.            return;
  641.        } else {
  642.  
  643.  
  644.  
  645.                youtube2mp3(url, language);
  646.                youtube2mp3Fast(url, language);
  647.                $(".progressState").css("visibility", "visible");
  648.                $(".fast").css("visibility", "visible");
  649.                $(".no-fast").css("visibility", "visible");
  650.                $("button[name='convert']").attr('disabled', true);
  651.                $("div[name='loader']").show();
  652.                $("div[name='no-fast-downloadHint']").show();
  653.                $("a[name='download']").hide();
  654.                $("a[name='download-fast']").hide();
  655.                $("a[name='download-fast-hand']").hide();
  656.                //为了确保progress4 停止用了120 大于progress4 100
  657.                //为了结束progress4
  658.                lastProgressEnd=true;
  659.                setTimeout(function(){showLoader();}, lastProgressIntervalTime+20);
  660.  
  661.  
  662.        }
  663.  
  664.    });
  665.  
  666.    function youtube2mp3Fast(url, language) {
  667.  
  668.  
  669.        if (typeof(url) != "undefined" && url != null) {
  670.  
  671.            var encodeUrl=encodeURIComponent("\""+url+"\"");
  672.            function gettingFast() {
  673.  
  674.                $.ajax({
  675.                    type: "get",
  676.                    url: "/youtube2mp3Fast?url=" + encodeUrl ,
  677.                    success: function (data) {
  678.                        flag = data;
  679.                        if (data.indexOf("excuting") == -1) {
  680.  
  681.                            $("button[name='convert']").attr('disabled', false);
  682.  
  683.                            //add download watch
  684.                            if (data.indexOf("res/youtube")==-1) {
  685.                                gtag('event', data, {
  686.                                    'event_category': "fast"+data+"-" + document.URL,
  687.                                    'event_label': "fast"+data +"-"+ document.URL+"-url:"+url,
  688.                                    'value': '1'
  689.                                });
  690.                            }
  691.  
  692.  
  693.                            switch (data) {
  694.                                case "ERROR: Unable to extract video":
  695.                                case "ERROR: unable to rename file":
  696.                                case "ERROR: urlopen error EOF occurred":
  697.                                case "ERROR: unable to download video data":
  698.                                case "ERROR: No video formats found":
  699.                                    youtube2mp3Fast(url, language);
  700.                                    return;
  701.                                case "ERROR: Invalid parameters. Maybe URL is incorrect":
  702.                                    $(".fast").css("visibility", "hidden");
  703.                                    alert("ERROR: maybe the reason is the URL is playlist but only has one video." +
  704.                                        "try remove the '&list=something' part of URL.");
  705.                                    return;
  706.  
  707.                                case "http error 429":
  708.                                    $(".fast").css("visibility", "hidden");
  709.  
  710.                                    alert("Too Many Requests,please wait a moment and try again.");
  711.                                    return;
  712.  
  713.                                case "Forbidden":
  714.                                    $(".fast").css("visibility", "hidden");
  715.  
  716.                                    alert("download of this time is forbidden by youtube," +
  717.                                        "We will go to the next line, you can wait or click the \"Convert\" button and try again");
  718.                                    return;
  719.                                case "ERROR: Unsupported URL":
  720.                                    $(".fast").css("visibility", "hidden");
  721.  
  722.                                    alert("ERROR: Unsupported URL,try the share link of video");
  723.                                    return;
  724.                                case "Syntax error: the most likely reason is that we do not support this URL":
  725.                                case "ERROR: ffmpeg exited, maybe the reason is the URL is Livestream which does not support yet.":
  726.                                case "ERROR: This video is private":
  727.                                case "ERROR: File is larger than max-filesize":
  728.                                case "ERROR: unable to open for writing":
  729.                                case "ERROR: requested format not available":
  730.                                case "ERROR: This playlist does not exist":
  731.                                case "ERROR: Unable to download webpage":
  732.                                case "ERROR: Did you forget to quote the URL":
  733.                                case "ERROR: This playlist is private":
  734.                                case "ERROR: Incomplete YouTube ID,URL looks truncated":
  735.                                case "ERROR: This video is DRM protected":
  736.                                case "ERROR: This video is only available for registered users":
  737.                                case "ERROR: The video you have requested has been rated TV-14 and may contain content intended for mature audiences.":
  738.                                case "time out!":
  739.                                case "ERROR: Cannot parse url data":
  740.                                case "YouTube said: This video has been removed for violating YouTube's policy on spam, deceptive practices, and scams":
  741.                                case "YouTube said:This video may be inappropriate for some users.":
  742.                                case "YouTube said: This video is only available to Music Premium members":
  743.                                case "YouTube said: This video contains content from organization, who has blocked it in your country on copyright grounds":
  744.                                case "YouTube said: This video is not available":
  745.                                case "YouTube said: This video contains content from PBS, who has blocked it in your country on copyright grounds":
  746.                                case "ERROR: This video requires payment to watch":
  747.                                case "YouTube said: The uploader has not made this video available in your country":
  748.                                case "it is not a valid URL":
  749.                                case "This video contains content from NBCU_Shows, who has blocked it in your country on copyright grounds.":
  750.                                case "YouTube said: This video has been removed by the uploader":
  751.                                case "ERROR: Watch this video on YouTube. Playback on other websites has been disabled by the video owner.":
  752.                                case "ERROR: Unable to extract JS player URL":
  753.  
  754.                                    $(".fast").css("visibility", "hidden");
  755.  
  756.                                    alert(data);
  757.                                    return;
  758.                                case "命令执行失败":
  759.                                case "convert fail":
  760.                                    $(".fast").css("visibility", "hidden");
  761.                                    alert("convert fail");
  762.                                    return;
  763.  
  764.  
  765.                                default: {
  766.  
  767.  
  768.  
  769.                                    var arrFastDownload=   data.split("||") ;
  770.                                    var title = arrFastDownload[0];
  771.                                    var directUrlAuto = arrFastDownload[1];
  772.                                    var directUrlhand = arrFastDownload[2];
  773.                                    var thumbnail = arrFastDownload[3];
  774.                                    var duration = arrFastDownload[4];
  775.                                    var duration_html=" <strong>Duration: </strong><span >" + duration + "</span>";
  776.                                    // directUrl 已经编码过,不用再编码,
  777.                                    var hrefAuto=directUrlAuto +"&title="+ encodeURI(title);
  778.                                    var hrefhand=directUrlhand +"&title="+ encodeURI(title);
  779.                                    $("div[name='loader-fast']").hide();
  780.                                    $("img[name='thumbnail']").attr('src', thumbnail);
  781.                                    $("img[name='thumbnail']").attr('alt', title);
  782.                                    $("div[name='video-title']").text( title);
  783.                                    $("div[name='duration']").html(duration_html);
  784.                                    $("a[name='download-fast']").attr('href', hrefAuto);
  785.                                    $("a[name='download-fast']").attr('download', title+".m4a");
  786.                                    $("a[name='download-fast']").show();
  787.  
  788.                                    $("a[name='download-fast-hand']").attr('href', hrefhand);
  789.                                    $("a[name='download-fast-hand']").attr('download', title+".m4a");
  790.                                    $("a[name='download-fast-hand']").show();
  791.  
  792.  
  793.  
  794.  
  795.                                }
  796.                            }
  797.                        }
  798.                    },
  799.  
  800.  
  801.                    error: function (xhr, textStatus,errorThrown) {
  802.                        // error: function (jqXHR, textStatus, errorThrown) {
  803.                        console.log('error:' + xhr.responseText);
  804.                        //没有错误内容可能是chrome 本身的这个错误 ERR_MANDATORY_PROXY_CONFIGURATION_FAILED
  805.                        if (typeof(xhr.responseText) != "undefined" && xhr.responseText != null && !isNull(xhr.responseText)) {
  806.                            flag = "error";
  807.  
  808.                            //即当后台convert 时间过长,超过cloudflare 的5分钟限制,会返回 524: A timeout occurred(cloudflare的设定)
  809.                            //就再请求转化一次,直到成功
  810.                            if ((xhr.responseText.indexOf("timeout occurred")!=-1 ||xhr.responseText.indexOf("timed out")!=-1)&& xhr.responseText.indexOf("cloudflare")!=-1)
  811.                            {
  812.                                console.log("cloudflare timeout occurred");
  813.                                gtag('event', 'error', {
  814.                                    'event_category' : textStatus+"-"+errorThrown+url+'-time out'+"-"+document.URL,
  815.                                    'event_label' : 'error-'+document.URL+xhr.responseText.substring(0,800) ,
  816.                                    'value': '1'
  817.                                });
  818.                                youtube2mp3Fast(url, language);
  819.                            }else if (xhr.responseText.indexOf("520: Web server is returning an unknown error")!=-1&&xhr.responseText.indexOf("cloudflare")!=-1) {
  820.                                gtag('event', 'error', {
  821.                                    'event_category' : textStatus+"-"+errorThrown+url+'-Web server is returning an unknown error'+"-"+document.URL,
  822.                                    'event_label' : 'error-'+document.URL ,
  823.                                    'value': '1'
  824.                                });
  825.                                youtube2mp3Fast(url, language);
  826.                            }else if (xhr.responseText.indexOf("File does not exist")!=-1) {
  827.  
  828.                                console.log("file does not exist,mybe it deleted by program");
  829.                                gtag('event', 'error', {
  830.                                    'event_category' : textStatus+"-"+errorThrown+"-"+url+'-File does not exist'+"-"+document.URL,
  831.                                    'event_label' : 'error-'+document.URL ,
  832.                                    'value': '1'
  833.                                });
  834.                                youtube2mp3Fast(url, language);
  835.                            }
  836.  
  837.                            else {
  838.  
  839.                                var time = new Date().Format("yyyy-MM-dd HH:mm:ss");
  840.                                if (xhr.responseText.length<800) {
  841.  
  842.                                    gtag('event', 'error', {
  843.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  844.                                        'event_label' : document.URL+"-"+xhr.responseText ,
  845.                                        'value': '1'
  846.                                    });
  847.                                }else {
  848.  
  849.                                    gtag('event', 'error', {
  850.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  851.                                        'event_label' : document.URL+"-1-"+xhr.responseText.substring(0,800) ,
  852.                                        'value': '1'
  853.                                    });
  854.                                    // str.substring(0,100) ,长度>str.length 返回原字符串
  855.                                    gtag('event', 'error', {
  856.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  857.                                        'event_label' : document.URL+"-2-"+xhr.responseText.substring(800,1600) ,
  858.                                        'value': '1'
  859.                                    });
  860.  
  861.  
  862.                                    gtag('event', 'error', {
  863.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  864.                                        'event_label' : document.URL+"-3-"+xhr.responseText.substring(1600,2400) ,
  865.                                        'value': '1'
  866.                                    });
  867.  
  868.  
  869.                                }
  870.  
  871.                                alert('error:' + xhr.responseText);
  872.                                $(".fast").css("visibility", "hidden");
  873.                                $("button[name='convert']").attr('disabled', false);
  874.                            }
  875.  
  876.                        }
  877.  
  878.                    }
  879.  
  880.  
  881.  
  882.  
  883.  
  884.                });
  885.  
  886.            };
  887.  
  888.  
  889.            var flag = "";
  890.            var startTime = new Date().getTime();//现在的时间
  891.            gettingFast();
  892.            var interval = setInterval(function () {
  893.                if (new Date().getTime() - startTime > 1800000
  894.                    || flag.indexOf("fast convert success") != -1
  895.                    || flag.indexOf("/res/youtube/") != -1
  896.                    || flag.indexOf("error") != -1
  897.                    || flag.indexOf("ERROR") != -1
  898.                    || flag.indexOf("not a valid URL") != -1
  899.                    || flag.indexOf("NBCU_Shows") != -1
  900.                    || flag.indexOf("命令执行失败") != -1
  901.                    || flag.indexOf("time out") != -1
  902.                    || flag.indexOf("Forbidden") != -1
  903.                    || flag.indexOf("is not available") != -1
  904.                    || flag.indexOf("convert fail") != -1
  905.                    || flag.indexOf("This video contains content from") != -1
  906.                    || flag.indexOf("YouTube said") != -1
  907.  
  908.  
  909.                ) {//现在的时间减去刷新开始的时间大于 60 秒
  910.                    clearInterval(interval);//就删除这个 setInterval 轮询
  911.                    return;
  912.                }
  913. //我的代码
  914.                myPoolFast(flag);
  915.                // getting();
  916. //我的代码结束
  917.            }, 2000);
  918.  
  919.  
  920.        }
  921.  
  922.        // 让轮询条件严格些,后台有返回才轮询
  923.  
  924.        function myPoolFast(str) {
  925.            if (str == "") {}
  926.            else {
  927.                gettingFast()
  928.            }
  929.        }
  930.    }
  931.    function youtube2mp3(url, language) {
  932.        if (typeof(url) != "undefined" && url != null) {
  933.            if (language=="") {
  934.                language="en";
  935.            }
  936.  
  937.            var encodeUrl=encodeURIComponent("\""+url+"\"");
  938.  
  939.  
  940.            function getting() {
  941.  
  942.                $.ajax({
  943.                    type: "get",
  944.                    url: "/youtube2mp3?url=" + encodeUrl + "&lang=" + language,
  945.                    success: function (data) {
  946.                        flag = data;
  947.                        if (data.indexOf("excuting") == -1) {
  948.  
  949.                            $("button[name='convert']").attr('disabled', false);
  950.  
  951.                            //add download watch
  952.                            if (data.indexOf("res/youtube")==-1) {
  953.                                gtag('event', data, {
  954.                                    'event_category': data+"-" + document.URL,
  955.                                    'event_label': data +"-"+ document.URL+"-url:"+url,
  956.                                    'value': '1'
  957.                                });
  958.                            }
  959.  
  960.  
  961.                            switch (data) {
  962.  
  963.                                //alert one time on fast convert
  964.  
  965.                                case "it is not a valid URL":
  966.                                case "Syntax error: the most likely reason is that we do not support this URL":
  967.                                case "YouTube said: This video contains content from PBS, who has blocked it in your country on copyright grounds":
  968.                                case "ERROR: This video requires payment to watch":
  969.                                case "YouTube said: The uploader has not made this video available in your country":
  970.                                case "This video contains content from NBCU_Shows, who has blocked it in your country on copyright grounds.":
  971.                                case "YouTube said: This video is not available":
  972.                                case "YouTube said: This video contains content from organization, who has blocked it in your country on copyright grounds":
  973.                                case "ERROR: Unable to download webpage":
  974.                                case "ERROR: Did you forget to quote the URL":
  975.                                case "ERROR: This playlist does not exist":
  976.                                case "ERROR: Invalid parameters. Maybe URL is incorrect":
  977.                                case "ERROR: Cannot parse url data":
  978.                                case "YouTube said: This video is only available to Music Premium members":
  979.                                case "YouTube said:This video may be inappropriate for some users.":
  980.                                case "YouTube said: This video has been removed for violating YouTube's policy on spam, deceptive practices, and scams":
  981.                                case "ERROR: The video you have requested has been rated TV-14 and may contain content intended for mature audiences.":
  982.                                case "ERROR: This video is only available for registered users":
  983.                                case "ERROR: This video is DRM protected":
  984.                                case "ERROR: Incomplete YouTube ID,URL looks truncated":
  985.                                case "ERROR: This playlist is private":
  986.                                case "YouTube said: This video has been removed by the uploader":
  987.                                case "ERROR: Watch this video on YouTube. Playback on other websites has been disabled by the video owner.":
  988.                                case "ERROR: Unable to extract JS player URL":
  989.  
  990.                                case "ERROR: Unsupported URL":
  991.                                    $(".no-fast").css("visibility", "hidden");
  992.                                    lastProgressEnd=true;
  993.                                    return;
  994.  
  995.                                case "ERROR: Unable to extract video":
  996.                                case "ERROR: unable to rename file":
  997.                                case "ERROR: urlopen error EOF occurred":
  998.                                case "ERROR: unable to download video data":
  999.                                case "ERROR: No video formats found":
  1000.                                    youtube2mp3(url, language);
  1001.                                    return;
  1002.  
  1003.  
  1004.                                case "http error 429":
  1005.                                    $(".no-fast").css("visibility", "hidden");
  1006.                                    lastProgressEnd=true;
  1007.                                    alert("Too Many Requests,please wait a moment and try again.");
  1008.                                    return;
  1009.                                case "Forbidden":
  1010.                                    $(".no-fast").css("visibility", "hidden");
  1011.                                    lastProgressEnd=true;
  1012.                                    alert("download of this time is forbidden by youtube," +
  1013.                                        "We will go to the next line, you can wait or click the \"Convert\" button and try again");
  1014.                                    return;
  1015.  
  1016.  
  1017.                                case "ERROR: ffmpeg exited, maybe the reason is the URL is Livestream which does not support yet.":
  1018.                                case "ERROR: This video is private":
  1019.                                case "ERROR: File is larger than max-filesize":
  1020.                                case "ERROR: unable to open for writing":
  1021.                                case "ERROR: requested format not available":
  1022.                                case "ERROR: the video number of playlist is too much, not support yet":
  1023.                                case "time out!":
  1024.                                case "ERROR:   Stream #1:0 -> #0:1":
  1025.                                    $(".no-fast").css("visibility", "hidden");
  1026.                                    lastProgressEnd=true;
  1027.                                    alert(data);
  1028.                                    return;
  1029.                                case "命令执行失败":
  1030.                                case "convert fail":
  1031.                                    $(".no-fast").css("visibility", "hidden");
  1032.                                    lastProgressEnd=true;
  1033.  
  1034.                                    alert("convert fail");
  1035.                                    return;
  1036.  
  1037.  
  1038.                                default: {
  1039.                                    lastProgressEnd=true;
  1040.                                    $("div[name='loader']").hide();
  1041.                                    $("div[name='no-fast-downloadHint']").hide();
  1042.                                    $("a[name='download']").attr('value', data);
  1043.                                    $("a[name='download']").show();
  1044.                                }
  1045.                            }
  1046.                        }
  1047.                    },
  1048.  
  1049.  
  1050.                    error: function (xhr, textStatus,errorThrown) {
  1051.                        // error: function (jqXHR, textStatus, errorThrown) {
  1052.                        console.log('error:' + xhr.responseText);
  1053.                        //没有错误内容可能是chrome 本身的这个错误 ERR_MANDATORY_PROXY_CONFIGURATION_FAILED
  1054.                        if (typeof(xhr.responseText) != "undefined" && xhr.responseText != null && !isNull(xhr.responseText)) {
  1055.                            flag = "error";
  1056.  
  1057.                            //即当后台convert 时间过长,超过cloudflare 的5分钟限制,会返回 524: A timeout occurred(cloudflare的设定)
  1058.                            //就再请求转化一次,直到成功
  1059.                            if ((xhr.responseText.indexOf("timeout occurred")!=-1 ||xhr.responseText.indexOf("timed out")!=-1)&& xhr.responseText.indexOf("cloudflare")!=-1)
  1060.                            {
  1061.                                console.log("cloudflare timeout occurred");
  1062.                                gtag('event', 'error', {
  1063.                                    'event_category' : textStatus+"-"+errorThrown+url+'-time out'+"-"+document.URL,
  1064.                                    'event_label' : 'error-'+document.URL+xhr.responseText.substring(0,800) ,
  1065.                                    'value': '1'
  1066.                                });
  1067.                                youtube2mp3(url, language);
  1068.                            }else if (xhr.responseText.indexOf("520: Web server is returning an unknown error")!=-1&&xhr.responseText.indexOf("cloudflare")!=-1) {
  1069.                                gtag('event', 'error', {
  1070.                                    'event_category' : textStatus+"-"+errorThrown+url+'-Web server is returning an unknown error'+"-"+document.URL,
  1071.                                    'event_label' : 'error-'+document.URL ,
  1072.                                    'value': '1'
  1073.                                });
  1074.                                youtube2mp3(url, language);
  1075.                            }else if (xhr.responseText.indexOf("File does not exist")!=-1) {
  1076.  
  1077.                                console.log("file does not exist,mybe it deleted by program");
  1078.                                gtag('event', 'error', {
  1079.                                    'event_category' : textStatus+"-"+errorThrown+"-"+url+'-File does not exist'+"-"+document.URL,
  1080.                                    'event_label' : 'error-'+document.URL ,
  1081.                                    'value': '1'
  1082.                                });
  1083.                                youtube2mp3(url, language);
  1084.                            }
  1085.  
  1086.                            else {
  1087.  
  1088.                                var time = new Date().Format("yyyy-MM-dd HH:mm:ss");
  1089.                                if (xhr.responseText.length<800) {
  1090.  
  1091.                                    gtag('event', 'error', {
  1092.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  1093.                                        'event_label' : document.URL+"-"+xhr.responseText ,
  1094.                                        'value': '1'
  1095.                                    });
  1096.                                }else {
  1097.  
  1098.                                    gtag('event', 'error', {
  1099.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  1100.                                        'event_label' : document.URL+"-1-"+xhr.responseText.substring(0,800) ,
  1101.                                        'value': '1'
  1102.                                    });
  1103.                                    // str.substring(0,100) ,长度>str.length 返回原字符串
  1104.                                    gtag('event', 'error', {
  1105.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  1106.                                        'event_label' : document.URL+"-2-"+xhr.responseText.substring(800,1600) ,
  1107.                                        'value': '1'
  1108.                                    });
  1109.  
  1110.  
  1111.                                    gtag('event', 'error', {
  1112.                                        'event_category' : textStatus+"-"+errorThrown+'-'+url+'-'+time+"-"+document.URL,
  1113.                                        'event_label' : document.URL+"-3-"+xhr.responseText.substring(1600,2400) ,
  1114.                                        'value': '1'
  1115.                                    });
  1116.  
  1117.  
  1118.                                }
  1119.  
  1120.                                alert('error:' + xhr.responseText);
  1121.                                $(".no-fast").css("visibility", "hidden");
  1122.                                    lastProgressEnd=true;
  1123.                                $("button[name='convert']").attr('disabled', false);
  1124.                            }
  1125.  
  1126.                        }
  1127.  
  1128.                    }
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.                });
  1135.  
  1136.            };
  1137.  
  1138.  
  1139.            var flag = "";
  1140.            var startTime = new Date().getTime();//现在的时间
  1141.            getting();
  1142.            var interval = setInterval(function () {
  1143.                if (new Date().getTime() - startTime > 1800000
  1144.  
  1145.                    || flag.indexOf("/res/youtube/") != -1
  1146.                    || flag.indexOf("error") != -1
  1147.                    || flag.indexOf("ERROR") != -1
  1148.                    || flag.indexOf("not a valid URL") != -1
  1149.                    || flag.indexOf("NBCU_Shows") != -1
  1150.                    || flag.indexOf("命令执行失败") != -1
  1151.                    || flag.indexOf("time out") != -1
  1152.                    || flag.indexOf("Forbidden") != -1
  1153.                    || flag.indexOf("is not available") != -1
  1154.                    || flag.indexOf("convert fail") != -1
  1155.                    || flag.indexOf("This video contains content from") != -1
  1156.                    || flag.indexOf("YouTube said") != -1
  1157.  
  1158.  
  1159.                ) {//现在的时间减去刷新开始的时间大于 60 秒
  1160.                    clearInterval(interval);//就删除这个 setInterval 轮询
  1161.                    return;
  1162.                }
  1163. //我的代码
  1164.                myPool(flag);
  1165.                // getting();
  1166. //我的代码结束
  1167.            }, 2000);
  1168.  
  1169.  
  1170.        }
  1171.  
  1172.        // 让轮询条件严格些,后台有返回才轮询
  1173.  
  1174.        function myPool(str) {
  1175.            if (str == "") {}
  1176.            else {
  1177.                getting()
  1178.            }
  1179.        }
  1180.    }
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.    function isNull(str) {
  1188.        if (str == "") return true;
  1189.        var regu = "^[ ]+$";
  1190.        var re = new RegExp(regu);
  1191.        return re.test(str);
  1192.    }
  1193.  
  1194.  
  1195.    var fastAutoDownloadFileWatch = function (ele) {
  1196.        gtag('event', 'download', {
  1197.            'event_category' : 'fastAuto-download-'+document.URL,
  1198.            'event_label' : 'fastAuto-download-'+document.URL ,
  1199.            'value': '1'
  1200.        });
  1201.        // console.log('fast');
  1202.        //propellerads 广告
  1203.        window.open("//stawhoph.com/afu.php?zoneid=3962035", "ad");
  1204.    };
  1205.    var fastHandDownloadFileWatch = function (ele) {
  1206.        gtag('event', 'download', {
  1207.            'event_category' : 'fastHand-download-'+document.URL,
  1208.            'event_label' : 'fastHand-download-'+document.URL ,
  1209.            'value': '1'
  1210.        });
  1211.        // console.log('fast');
  1212.        //propellerads 广告
  1213.        window.open("//stawhoph.com/afu.php?zoneid=3962035", "ad");
  1214.    };
  1215.  
  1216.    
  1217.  
  1218.  
  1219.    var downloadFile = function (ele) {
  1220.  
  1221.        gtag('event', 'download', {
  1222.            'event_category' : 'download-'+document.URL,
  1223.            'event_label' : 'download-'+document.URL ,
  1224.            'value': '1'
  1225.        });
  1226.  
  1227.        //propellerads 广告
  1228.        window.open("//stawhoph.com/afu.php?zoneid=3962035", "ad");
  1229.  
  1230.        $.ajax({
  1231.            url: "/checkFileIsExist",
  1232.            data: {
  1233.                url: $(ele).attr("value")
  1234.            },
  1235.  
  1236.            dataType: "json",
  1237.            success: function (data) {
  1238.            },
  1239.            //无论checkfile 返回success,or fail 都会进入这里
  1240.            error: function (xhr, error) {
  1241.                if (xhr.responseText.indexOf("fail") != -1) {
  1242.                    alert(xhr.responseText)
  1243.                }
  1244.                ;
  1245.            },
  1246.  
  1247.        });
  1248.  
  1249.  
  1250.        var form = $("<form>");
  1251.  
  1252.        $('body').append(form);
  1253.        form.attr('style', 'display:none');
  1254.        form.attr('target', '');
  1255.        form.attr('method', 'post');
  1256.        form.attr('action', '/downloadYoutubeFile');//下载文件的请求路径
  1257.        var input1 = $('<input>');
  1258.        input1.attr('type', 'text');
  1259.        input1.attr('name', 'url');
  1260.        input1.attr('value', $(ele).attr("value"));
  1261.        form.append(input1);
  1262.        form.submit();
  1263.        return false;
  1264.  
  1265.    };
  1266.  
  1267.    function showModal() {
  1268.        if (Cookies.get('addfavoriteDecare')=='1') {
  1269.        } else {
  1270.            setTimeout(function() {
  1271.                $('#exampleModalCenter').modal('show');
  1272.            }, 2000);
  1273.        }
  1274.  
  1275.    }
  1276.    function addFavorite() {
  1277.        Cookies.set('addfavoriteDecare', '1', { expires: 3650, path: '' });
  1278.        //添加watch addFavorite
  1279.        gtag('event', 'accept', {
  1280.            'event_category' : 'accept-addFavorite-'+ document.URL,
  1281.            'event_label' : 'Yes, i promise to add favorite' ,
  1282.            'value': '1'
  1283.        });
  1284.  
  1285.  
  1286.  
  1287.        $('#exampleModalCenter').modal('hide');
  1288.    }
  1289.  
  1290.    function rejectAddFavorite() {
  1291.        //添加watch rejcetAddFavorite google analytics
  1292.        gtag('event', 'reject', {
  1293.            'event_category' : 'reject-addFavorite-'+ document.URL,
  1294.            'event_label' : 'No, i reject' ,
  1295.            'value': '1'
  1296.        });
  1297.  
  1298.    }
  1299.  
  1300.    Date.prototype.Format = function (fmt) { // author: meizz
  1301.        var o = {
  1302.            "M+": this.getMonth() + 1, // 月份
  1303.            "d+": this.getDate(), // 日
  1304.            "H+": this.getHours(), // 小时
  1305.            "m+": this.getMinutes(), // 分
  1306.            "s+": this.getSeconds(), // 秒
  1307.            "q+": Math.floor((this.getMonth() + 3) / 3), // 季度
  1308.            "S": this.getMilliseconds() // 毫秒
  1309.        };
  1310.        if (/(y+)/.test(fmt))
  1311.            fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  1312.        for (var k in o)
  1313.            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  1314.        return fmt;
  1315.    }
  1316.  
  1317. </script>
  1318. <!--不能用压缩的-->
  1319. <script src="/plugins/mainApp/controllers/login_Controller.js"></script>
  1320. <!-- Go to www.addthis.com/dashboard to customize your tools -->
  1321. <script async="" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5e3f73cf11068c07" type="text/javascript"></script>
  1322. <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.1/js.cookie.min.js"></script>
  1323.  
  1324.  
  1325. </body></html>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda