需要有关编码Dropbox下载器的帮助。 [英] Need help with coding a Dropbox downloader.

查看:94
本文介绍了需要有关编码Dropbox下载器的帮助。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在编写一个C#应用程序,该应用程序使用Dropbox API从共享的Dropbox文件夹下载。我可以访问自己的帐户和文件夹和文件。但是,当我尝试访问给定链路看起来像这样:

I am writing a C# application that downloads from a shared Dropbox folder using Dropbox API. I am able to access my own account and folders and files. But when I try to access the given link which looks like this:

https://wixlabs---dropbox-folder.appspot.com/index?instance=UexTyTTXTALjKbz1f1P3H5nZAFTiMsLw2wWcu_0uebU.eyJpbnN0YW5jZUlkIjoiNzk4YzZlYTUtMDg5Yi00ZjFlLWI2NzMtOWYxZjA1OTU1YmQ5IiwiYXBwRGVmSWQiOiIxNDkyNDg2NC01NmQ1LWI5NGItMDYwZi1jZDU3YmQxNmNjMjYiLCJtZXRhU2l0ZUlkIjoiYmRkMzFlNjMtY2I5Ny00ZTMxLWI5NGEtMGFhNmI5MzgwYjY3Iiwic2lnbkRhdGUiOiIyMDE4LTEwLTA0VDAwOjE4OjIyLjM5MFoiLCJ1aWQiOm51bGwsInZlbmRvclByb2R1Y3RJZCI6bnVsbCwiZGVtb01vZGUiOmZhbHNlfQ&target = _top& width = 576& compId = comp-jmtmo1bb& viewMode = viewer-seo

https://wixlabs---dropbox-folder.appspot.com/index?instance=UexTyTTXTALjKbz1f1P3H5nZAFTiMsLw2wWcu_0uebU.eyJpbnN0YW5jZUlkIjoiNzk4YzZlYTUtMDg5Yi00ZjFlLWI2NzMtOWYxZjA1OTU1YmQ5IiwiYXBwRGVmSWQiOiIxNDkyNDg2NC01NmQ1LWI5NGItMDYwZi1jZDU3YmQxNmNjMjYiLCJtZXRhU2l0ZUlkIjoiYmRkMzFlNjMtY2I5Ny00ZTMxLWI5NGEtMGFhNmI5MzgwYjY3Iiwic2lnbkRhdGUiOiIyMDE4LTEwLTA0VDAwOjE4OjIyLjM5MFoiLCJ1aWQiOm51bGwsInZlbmRvclByb2R1Y3RJZCI6bnVsbCwiZGVtb01vZGUiOmZhbHNlfQ&target=_top&width=576&compId=comp-jmtmo1bb&viewMode=viewer-seo

我得到一个例外,找不到路径,但路径存在,因为我使用了在浏览器中链接以下载文件。因此,我怀疑它与链接本身有关,我一直收到此错误。 

I get an exception that the path could not be found, but the path exists as I have used the link in the browser to download the files. So, I suspect that it has something to do with the link itself that I keep getting this error. 

我还使用WebClient读取文件夹,我得到的代码包含包含JSON对象的JavaScript的html和css。 html看起来像这样:

I have also used WebClient to read the folder and I get a code which contains html and css with JavaScript containing a JSON object. The html looks like this:

但是我找不到任何可以解析的文件名并使用WebClient本身下载。

But I couldn't find the file name anywhere that I could parse and use WebClient itself to download.

非常感谢任何想法或帮助。在此先感谢您的帮助。

Any ideas or help is greatly appreciated. Thanks in advance for the help.

推荐答案

您发布的网址是一个网页。因此,这就是你会得到的。如今,大多数网页(包括此网页)都会使用API​​调用来填充页面。您无法从此HTML获取下载URL,因为您无法运行脚本来生成它。

The URL you posted is a web page. Therefore that is what you'll get back. Most webpages these days (including this one) then use API calls to fill out the page. You're not going to be able to get the download URL from this HTML because you aren't able to run the scripts to generate it.

相反,您需要获取要下载的实际文件的URL。 DropBox API具有
端点,允许您直接在没有UI的情况下下载文件。您需要使用其API中记录的正确端点直接下载文件。

Instead you need to get the URL to the actual file you want to download. The DropBox API has endpoints to allow you to download files directly without the UI. You'll need to use the correct endpoint as documented in their API to download files directly.


这篇关于需要有关编码Dropbox下载器的帮助。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆