从box.com下载文件

发布于 2025-02-06 22:51:06 字数 219 浏览 3 评论 0原文

我正在尝试自动从Box.com文件夹下载一组CSV文件,该文件夹已与我共享,因为数据已添加到文件中,我希望一个Python脚本每周获取这些数据并将其导入我的格式化MySQL数据库。不幸的是,我从来没有使用过盒子,当试图查找方法时,我的大脑会被所有涉及Box Developer和创建应用程序所理解的技术作品炸毁。有人可以解释如何使用Python访问和下载这些文件的基本过程?只要我了解访问的过程,我不一定需要编码方面的帮助。

I'm trying to automate downloading a set of csv files from a box.com folder that has been shared with me because data gets added to the files and I want a python script to take that data every week and import it into my formatted MySQL database. Unfortunately, I've never used box before and when trying to look up ways to do this, my brain gets fried by all the technical pieces that I can't understand involving box developer and creating apps. Can someone explain the basic process of how I would go about accessing and downloading these files with python? I don't necessarily need help with the coding as long as I understand the process of what to access.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

山色无中 2025-02-13 22:51:06

您有两种方法可以解决这个问题。

1。:使用无头铬模拟您与网站互动,例如。模拟用户输入以下载文件。 (有点骇客,可能很快就会破裂)

2。:倒入登录和API列出和下载文件。这将是最佳解决方案,因为它效率更高,但需要更多的努力。您可以通过打开Chromes DevTools并查看网站提出的要求来解决此问题。对于初学者,您可以手工登录并“窃取”自己的验证令牌,因此您的脚本不需要身份验证功能。

注意:这只是一些指示,因为我还没有专门查看过该网站。

You have two ways to go about this.

1.: Using headless chrome simulating you interacting with the website, eg. Emulating the user input for downloading the files. (Kind of hacky and could break really soon)

2.: Reverse-Engineering the sign-in and api to list and download files. This would be the optimal solution, as it is way more efficient, but requires more effort. You can go about this by opening chromes devtools and looking at the request the site makes. For starters, you could sign in by hand and “steal” your own auth token, so your script won’t need the authentication functionality.

Note: this are just some pointers, as I havent specifically looked at the website.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文