title: Download the file from Google.Drive via WebClient C#
body: <p>Me need to download the file at: <a href="https://drive.google.com/u/0/uc?id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo&amp;export=download" rel="nofollow noreferrer">https://drive.google.com/u/0/uc?id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo&amp;export=download</a></p>
  <p>But after downloading the file, I get just a document with a single line: &quot;Google Drive-Virus scan warning&quot;. In theory, I should download the file from the link specified in the url (I got it through the browser console), but instead I download an incomprehensible document with one line. As far as I understand, I download the page markup, but not the file itself. How can this be fixed ?</p>
  <p>To download a file, use the following method:</p>
  <pre><code>using System;
  using System.Net;
  
  
  public class Program
  {
  
      public static void Main(string[] args)
      {
          {
              string url = &quot;https://drive.google.com/u/0/uc?export=download&amp;confirm=pKfr&amp;id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo&quot;;
              string savePath = @&quot;C:\Users\Saint\Desktop\TaskRetail\yml.xml&quot;;
              WebClient client = new WebClient();
              client.DownloadFile(url, savePath);
              Console.ReadLine();
          }
      }
  </code></pre>