-
Notifications
You must be signed in to change notification settings - Fork 3
Windows install instructions
This guide explains the setup steps necessary to run the BitcasaFileFetcher on windows. Throughout this guide I am using powershell simply because it is more convenient. It is recommended to run the powershell window as an administrator while installing but it may not be necessary. These instructions should also work in command prompt. I had issues using pip modules in cygwin so I wouldn't recommend using it unless you know what you are doing.
- First you need python. To check if python is already installed simply open powershell and type
python --version
. This should outputPython 2.7.x
(the value ofx
doesn't matter) - If this outputs
Python 3.x.x
then continue bellow to install 2.7 (NOTE: In some cases to find this out check the installed programs listing) - If you do not have python installed, install it from their website using the proper MSI installer. This is usually Windows x86 MSI Installer (2.7.x). Use the Windows x86-64 MSI for x64 support.
- Once installed, open up powershell and type
python --version
to verify it worked. (Troubleshooting python is beyond the scope of this tutorial)
-
pip
is a package manager application. It is the best way to install python modules. - To install pip follow this guide. There is a very decent Stack overflow article that explains this method as well as others. If you have trouble with the first method try referencing this answer
- (NOTE: You will need to run
python get-pip.py
in powershell) - To verify pip was installed simply run
pip
in powershell.
- The BitcasaFileFetcher utilizes
requests unidecode
- To install it, issue the following command in powershell:
pip install requests unidecode
- To verify they were installed. Run the following sequence of commands in powershell
python
import requests
quit()
- If there are no errors, it installed properly
- After successfully installing python, pip, wget, and requests you can now easily run getfiles.py
- First, Download the git project
- Unzip it to a directory of your preference
- Open powershell and cd to that directory. For example:
cd C:\Users\<user>\Downloads\BitcasaFileLister-master
- cd to the python directory.
cd python
- Get the oauth url from getfiles.py using the following command:
python getfiles.py --oauth
- Copy and paste the displayed link to your browser.
- Click Login to authorize access via Bitcasa oAuth
- After successful login, copy the token displayed and paste it to the following command:
python getfiles.py --settoken <token you copied>
- To get the Base64 file paths, go back to your browser, scroll down and click login
- This login is only used to authorize the hosted file lister access to display your files
- After successful login your files along with their Base64 paths are displayed
- You will need the listed access token as well as the base64 path from second column
- Important test getfiles.py with a single level directory containing a small number of files
#Local Destination: be sure to specify the drive letter for absolute paths
#Also, ensure to wrap paths with spaces or other special characters in quotes
python getfiles.py <Base64 Path> <Local Destination>
#For example:
python getfiles.py /B-W80yjUQfC6umkOCahHMQ "E:\bitcasa\saved files\"
This should download the files located at the specified base4 path to the local destination directory.
To download files to a network drive, it is best to use a local temporary directory. To do that, use the following syntax:
python getfiles.py /B-W80yjUQfC6umkOCahHMQ "\\NETWORKDRIVE\bitcasa\saved files\" -t "E:\bitcasa\temp\"
This will download the files to E:\bitcasa\temp
first and then to the network location. I personally have found this method to be faster when dealing with network storage.
To display progress of downloads add the -p
flag like so:
python getfiles.py /B-W80yjUQfC6umkOCahHMQ "E:\bitcasa\saved files\" -p
To enable extra logging for support or debugging utilize the --verbose
flag like so:
python getfiles.py /B-W80yjUQfC6umkOCahHMQ "E:\bitcasa\saved files\" --verbose