๐ Python wrapper for gofile.io Upload API1.
- ๐ python>=3.7
pip install gofilepy
pip install -U gofilepy
usage: gofilepy [-h] [-s] [-o] [-e] [-vv] [-v] path [path ...]
Example: gofile <file/folder_path>
positional arguments:
path Path to the file(s) and/or folder(s)
options:
-h, --help show this help message and exit
-s, --to-single-folder
Upload multiple files to the same folder. All files
will share the same URL. This option requires a valid
token exported as: `GOFILE_TOKEN`
-o, --open-urls Open the URL(s) in the browser when the upload is
complete (macOS-only)
-e, --export Export upload response(s) to a JSON file
-vv, --verbose Show more information
โ gofile foo.txt
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ File: foo.txt โ
โ Download page: https://gofile.io/d/PkdZP5 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Uploading progress: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
โ gofile foo.txt bar.txt foobar.txt foo/
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ File: foo.txt โ
โ Download page: https://gofile.io/d/rLwQVZ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ File: bar.txt โ
โ Download page: https://gofile.io/d/DdS7mZ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ File: foobar.txt โ
โ Download page: https://gofile.io/d/C1VicP โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ File: foo/foo_1.txt โ
โ Download page: https://gofile.io/d/CkYw18 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Uploading progress: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
This option requires a Gofile token (see: ## Misc.).
โ gofile -s foo.txt bar.txt
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Files: โ
โ foo.txt โ
โ bar.txt โ
โ Download page: https://gofile.io/d/bFwawd โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Uploading progress: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
โ gofile -vv foo.txt
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ { โ
โ "foo.txt": { โ
โ "timestamp": "30-05-2022 18:42:15", โ
โ "response": { โ
โ "status": "ok", โ
โ "data": { โ
โ "guestToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", โ
โ "downloadPage": "https://gofile.io/d/sU4hV1", โ
โ "code": "sU4hV1", โ
โ "parentFolder": "7ad2d249-96a1-4675-b185-05665fbc9a46", โ
โ "fileId": "0e93e093-d122-4e42-a1be-2e7d34d78ffb", โ
โ "fileName": "foo.txt", โ
โ "md5": "d41d8cd98f00b204e9800998ecf8427e" โ
โ } โ
โ } โ
โ } โ
โ } โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Uploading progress: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
โ gofile -e foo.txt
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ File: foo.txt โ
โ Download page: https://gofile.io/d/8t79Lz โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Uploading progress: โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
Exported data to: gofile_export_1653950555.json
Content of gofile_export_1653950555.json
[
{
"foo.txt": {
"timestamp": "30-05-2022 18:42:35",
"response": {
"status": "ok",
"data": {
"guestToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"downloadPage": "https://gofile.io/d/8t79Lz",
"code": "8t79Lz",
"parentFolder": "05xd4cb-8965-417f-ae34-a116et99b798",
"fileId": "d1fc3a97-8xe3-486a-bc0d-edb1rb103040",
"fileName": "foo.txt",
"md5": "d41d8cd99f00b204e9810998ecf8427e"
}
}
}
}
]
If you want the files to be uploaded to a specific account, you can export your gofile token, which can be retrieved from the profile page, as an environment variable GOFILE_TOKEN
.
export GOFILE_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Footnotes
-
Disclaimer: This tool is not associated with Gofile, WOJTEK SAS ยฉ, or the Gofile Team. โฉ