Shabinder / SpotiFlyer

Kotlin Multiplatform Music Downloader, Supports Spotify / Gaana / Youtube Music / Jio Saavn / SoundCloud.
https://soundbound.app
GNU General Public License v3.0
10.29k stars 770 forks source link

[BUG] : YT Resolver Doesnt work in every Country #651

Closed PeterZickelbein closed 2 years ago

PeterZickelbein commented 2 years ago

Describe the bug: After pasting a Spotify URL the Win Desktop App finds Cover and tracks, but after hitting download it gets an error (X button)

Media Links Used: https://open.spotify.com/album/0sT6GEnFvlhaVpJo0yGhJu

Expected behavior Start downloading in my download folder :D

Screenshots: Bild1

StackTrace:

DownloadLinkFetchFailed(errorTrace=Find Link for Shrek - Intro 

Fetching From Saavn Failed:DownloadLinkFetchFailed(errorTrace=No SAAVN Match Found for Shrek - Intro)
    at com.shabinder.common.providers.saavn.requests.JioSaavnRequests$DefaultImpls.findBestSongDownloadURL(JioSaavnRequests.kt:37)
    at com.shabinder.common.providers.saavn.requests.JioSaavnRequests$findBestSongDownloadURL$1.invokeSuspend(JioSaavnRequests.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
    at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
    at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
    at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
    at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
    at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
    at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
    at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
    at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
    at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Fetching From YT-Music Failed:io.ktor.client.features.ServerResponseException: Server error(https://yt1s.com/api/ajaxSearch/index: 503 Service Temporarily Unavailable. Text: "<!DOCTYPE HTML>
<html lang="en-US">
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
  <meta name="robots" content="noindex, nofollow" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <title>Just a moment...</title>
  <style type="text/css">
    html, body {width: 100%; height: 100%; margin: 0; padding: 0;}
    body {background-color: #ffffff; color: #000000; font-family:-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue",Arial, sans-serif; font-size: 16px; line-height: 1.7em;-webkit-font-smoothing: antialiased;}
    h1 { text-align: center; font-weight:700; margin: 16px 0; font-size: 32px; color:#000000; line-height: 1.25;}
    p {font-size: 20px; font-weight: 400; margin: 8px 0;}
    p, .attribution, {text-align: center;}
    #spinner {margin: 0 auto 30px auto; display: block;}
    .attribution {margin-top: 32px;}
    @keyframes fader     { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }
    @-webkit-keyframes fader { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }
    #cf-bubbles > .bubbles { animation: fader 1.6s infinite;}
    #cf-bubbles > .bubbles:nth-child(2) { animation-delay: .2s;}
    #cf-bubbles > .bubbles:nth-child(3) { animation-delay: .4s;}
    .bubbles { background-color: #f58220; width:20px; height: 20px; margin:2px; border-radius:100%; display:inline-block; }
    a { color: #2c7cb0; text-decoration: none; -moz-transition: color 0.15s ease; -o-transition: color 0.15s ease; -webkit-transition: color 0.15s ease; transition: color 0.15s ease; }
    a:hover{color: #f4a15d}
    .attribution{font-size: 16px; line-height: 1.5;}
    .ray_id{display: block; margin-top: 8px;}
    #cf-wrapper #challenge-form { padding-top:25px; padding-bottom:25px; }
    #cf-hcaptcha-container { text-align:center;}
    #cf-hcaptcha-container iframe { display: inline-block;}
  </style>

      <meta http-equiv="refresh" content="35">
  <script type="text/javascript">
    //<![CDATA[
    (function(){

      window._cf_chl_opt={
        cvId: "2",
        cType: "non-interactive",
        cNounce: "47295",
        cRay: "6995fbefdec8698f",
        cHash: "3f17fdf683b4168",
        cFPWv: "g",
        cTTimeMs: "1000",
        cRq: {
          ru: "aHR0cHM6Ly95dDFzLmNvbS9hcGkvYWpheFNlYXJjaC9pbmRleA==",
          ra: "S3RvciBjbGllbnQ=",
          rm: "UE9TVA==",
          d: "dlcbXpGnNs44Aclqe54P8dGmwHx8Ca1MLyvrA1vKZsb74mGPjBvskSLRQjmX3ytrII/pTCHOjox2ikJL1zPz5XlMac4O8Al6MT0u2woZJx8nxoOENFRsVfiNEM9E60AGtNRfYJIynHzEhG6SEwx6Kq5H5K7yvzP3Sw6+Rxm39K36wVQuSRWzm0Eeq0joBe4Ghd7WKS0ZAE8flonI9FiS7oXSiyXXZXo42kGeIGiVSXG5RHHwcD78jAb8vQnJWvHdXoeZjdyYkCiVemhWnrjxMdkSFefIOmakfJbOjyNQ28EUx1l1WDtjPFhJjRcwRT49SUtFFttm6EyL0QczC+H9ZSyBe789gl8aUWgK35PQ6Bi5b6xdSAB9Om10hdwTBrF4okxS+UcZ79Y+ysF3JFkrC7zmYg8eD1GQnumFE0cQbr9Ts9BVXkBdDJDzC4AH7QUoa2K+C5hXn6ty99eJSYcGwy/xO6Wzyj5wK/5Y8x3/WMrDx8OECSjtBhgcHi/zBVeesZO7MhEJI/KCIpuHbDD99A==",
          t: "MTYzMzQyOTkyNi4zNzgwMDA=",
          m: "wYZoIy3LPzNP6F7TAyMjYDAMBok/BhYJIc+2IeZxUpU=",
          i1: "ak15QICtrVgtCC05NiZ4uQ==",
          i2: "6ea1JrhL7aSwxOPEXMwQbw==",
          zh: "slbOGnEscRNxFiOnTsX0AKh1TuDl2qbz+DoFMtxCWD8=",
          uh: "oz7OrxkrnxacOh3btzIq4iwAY0NK/hCkZ0LN2B2nTlI=",
          hh: "LBSS74KkcrNPPaDUVSmWQv8ZxJLhGAngcURUX8gX1AQ=",
        }
      }
      window._cf_chl_enter = function(){window._cf_chl_opt.p=1};

    })();
    //]]>
  </script>

</head>
<body>
  <table width="100%" height="100%" cellpadding="20">
    <tr>
      <td align="center" valign="middle">
          <div class="cf-browser-verification cf-im-under-attack">
  <noscript>
    <h1 data-translate="turn_on_js" style="color:#bd2426;">Please turn JavaScript on and reload the page.</h1>
  </noscript>
  <div id="cf-content" style="display:none">

    <div id="cf-bubbles">
      <div class="bubbles"></div>
      <div class="bubbles"></div>
      <div class="bubbles"></div>
    </div>
    <h1><span data-translate="checking_browser">Checking your browser before accessing</span> yt1s.com.</h1>

    <div id="no-cookie-warning" class="cookie-warning" data-translate="turn_on_cookies" style="display:none">
      <p data-translate="turn_on_cookies" style="color:#bd2426;">Please enable Cookies and reload the page.</p>
    </div>
    <p data-translate="process_is_automatic">This process is automatic. Your browser will redirect to your requested content shortly.</p>
    <p data-translate="allow_5_secs" id="cf-spinner-allow-5-secs" >Please allow up to 5 seconds&hellip;</p>
    <p data-translate="redirecting" id="cf-spinner-redirecting" style="display:none">Redirecting&hellip;</p>
  </div>

  <form class="challenge-form" id="challenge-form" action="/api/ajaxSearch/index?__cf_chl_jschl_tk__=pmd_GKzmMTryvyt5GbwPzlfQnRDTt2kxQaBcHeDjtiEVUjQ-1633429926-0-gqNtZGzNAiWjcnBszQdl" method="POST" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="md" value="Uo6_4Pjp.Kq8CStig_TmwJSZNSHKTSGhC.n6tVvR37Q-1633429926-0-AVyJp0JxDAu4_brc2KHjgWAW4iE3QyeD9ulQ5w7koABt9NTLjmn0Ajq1F71OuTFBtlPdg8BUHe0ZVffphwsBVRmwrZfEa4RPTRRRgJ0YalU512DqnVzwB3HaHJGzEHYUULHbG0uZMIehyLtPqaezmOx0b7gZwwQKwsVzGZUqE50KKX-6pYWI9ds9xM9-PX729Q2EekKWaij85QFD3BsaQ-N57uSXZF1Me4_T4c6VRF0TycmwdR8SfQwYQpPC7WYkbeyBF9PmiWP0CG039GLOsbLKfWiJfAMZfh1o4m_x9v0P8kjPJbP1R5cXeRDQOzSXBo9Cnejvl5wdZDvaKR6iaoai7YA5BSiW3g3RlX9pKzIRE2foHZbt8QeAwwRMnJsNGe7r1N3Y34CtTbAb-qI1T6ttqkMJ8iHhzc4Lnq_3CwnE9hSEdN2SI_w_NN42xYKtaCx3mzgsQn80ntb4-o91_3HY3i__Nx8-p-wM6qKSRmx7" />
    <input type="hidden" name="r" value="O1HX0sS5t.5zZZHX.EIuLaLXC5j8b7rPjyU8VgncpUU-1633429926-0-ATwbjIcLFdLNham/VeU684dAq8VyDYVJ+i4QYkIoHuO4YjqX5Ng7zhs2TTHRBrp+fa2OYSLC2nuhaEbfkDiOHwAIo0Qf+r/2POokiVgAf0Ym7Lj0NPaq8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ly7M+yCF2zdglygaQw2Nj+oc3DLDoMnv5lp6cBCuoVUvcO7mNUSaGrAteBkzbNf4tSpwBJQas6SMddM6GqiiJJSdpOXhRuqQ2hBYlbvtzQXvTp2vg5poo1vErGUjQFXcE0UEydRnJb4A8Rm9O1KmtuqT12qIxv5dP+PFJLsu41lG8vot8xWjVY1gMtrDi9oG2e5WVXffGfSAwCEwVJ1oG0ynM14IVnF1F3/jXC6y1kmRbv3MtJJhOs7aZuIrZm91LfIn/V33TIaB69yt64j1xuLr99NCoh/soohdC7IDW7xHkLeYtSHRjbLSSAdaFWHrK4vwknmK+wJEq88PUakj1VFE0zMlX51zWRKt7PGutJQ+UHcBG0e36+8La3DrsfNj+lf5AGa0INSbStcfALPmoKns6usKdw75z7K2JIgKswskC6twr40KleWsrVhgo/q/unE+hEGSJWuQ3EtJUhcnkf9P0TVqKt8oSIB86swQ+zAQ6m+r2SfisDYbpe+N8q0NXRDm7bIhgKgzeWd9UNOMDJd1+n/xeGjpQFxpFowrR6RScsYbzizDwaz/GeO509tbRqnlV9BevA+oXpRjFlR80Z+bGjmCJE/epnE2i/Dr/aGBoRlkxoVQRDYQqy5Kj0EVMj"/>
    <input type="hidden" value="4d85215571b953511d5457374e697063" id="jschl-vc" name="jschl_vc"/>
    <!-- <input type="hidden" value="" id="jschl-vc" name="jschl_vc"/> -->
    <input type="hidden" name="pass" value="1633429927.378-7qKw+xZ4Ct"/>
    <input type="hidden" id="jschl-answer" name="jschl_answer"/>
  </form>

    <script type="text/javascript">
      //<![CDATA[
      (function(){
          var a = document.getElementById('cf-content');
          a.style.display = 'block';
          var isIE = /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent);
          var trkjs = isIE ? new Image() : document.createElement('img');
          trkjs.setAttribute("src", "/cdn-cgi/images/trace/jschal/js/transparent.gif?ray=6995fbefdec8698f");
          trkjs.id = "trk_jschal_js";
          trkjs.setAttribute("alt", "");
          document.body.appendChild(trkjs);
          var cpo=document.createElement('script');
          cpo.type='text/javascript';
          cpo.src="/cdn-cgi/challenge-platform/h/g/orchestrate/jsch/v1?ray=6995fbefdec8698f";
          document.getElementsByTagName('head')[0].appendChild(cpo);
        }());
      //]]>
    </script>

  <div id="trk_jschal_nojs" style="background-image:url('/cdn-cgi/images/trace/jschal/nojs/transparent.gif?ray=6995fbefdec8698f')"> </div>
</div>

          <div class="attribution">
            DDoS protection by <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing/" target="_blank">Cloudflare</a>
            <br />
            <span class="ray_id">Ray ID: <code>6995fbefdec8698f</code></span>
          </div>
      </td>

    </tr>
  </table>
</body>
</html>
"
    at io.ktor.client.features.DefaultResponseValidationKt$addDefaultResponseValidation$1$1.invokeSuspend(DefaultResponseValidation.kt:48)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

)
    at com.shabinder.common.providers.FetchPlatformQueryResult.findBestDownloadLink(FetchPlatformQueryResult.kt:172)
    at com.shabinder.common.providers.FetchPlatformQueryResult$findBestDownloadLink$1.invokeSuspend(FetchPlatformQueryResult.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
    at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
    at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
    at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
    at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:194)
    at io.ktor.util.pipeline.SuspendFunctionGun.access$resumeRootWith(SuspendFunctionGun.kt:15)
    at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:89)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Device Info (please complete the following information):

Additional context:

Shabinder commented 2 years ago

Hello @PeterZickelbein , can you try one thing? please try downloading the same song using a VPN to a country like the USA / India etc. and if it fails share the stacktrace again, I have a hunch I need to confirm. Thanks.

PeterZickelbein commented 2 years ago

Works with an USA VPN. Great, thank you!

What was the problem?

Shabinder commented 2 years ago

The YT Resolver Server wasn't responding to requests from Germany, will host one myself I guess...

Shabinder commented 2 years ago

Can u try again with v3.5.0