Code Monkey home page Code Monkey logo

py-wetransfer's People

Contributors

superalex avatar szepeviktor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py-wetransfer's Issues

doesn't work anymore ?

Hello
I have an issue since today while trying to download.

python wetransfer.py -u https://www.wetransfer.com/downloads/88d55358d83fdda2aa4ff2ff6c0cdb4220160106184103/f1dccfc494c72d5f42e3ace7bc2700a520160106184103/09e850

Downloading https://www.wetransfer.com/api/v1/transfers/88d55358d83fdda2aa4ff2ff6c0cdb4220160106184103/download?recipient_id=f1dccfc494c72d5f42e3ace7bc2700a520160106184103&security_hash=09e850&password=&ie=false...
Traceback (most recent call last):
File "wetransfer.py", line 109, in
main(sys.argv[1:])
File "wetransfer.py", line 101, in main
download(file_id, recipient_id, security_hash)
File "wetransfer.py", line 26, in download
content_info_string = parse_qs(urlparse(download_data['direct_link']).query)['response-content-disposition'][0]
KeyError: 'response-content-disposition'

Any idea ?
Thank you

SSLv3 not longer supported

Hello,

you need to modify the script to use TLS instead of SSLv3

I got this error:

Traceback (most recent call last):
File "wetransfer.py", line 127, in
main(sys.argv[1:])
File "wetransfer.py", line 119, in main
download(file_id, recipient_id, security_hash)
File "wetransfer.py", line 34, in download
r = requests.get(download_data['direct_link'], stream=True)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 55, in get
return request('get', url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
r = adapter.send(request, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
raise SSLError(e)
requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

I have the same issue

Downloading https://www.wetransfer.com/api/v1/transfers/033820e7d0a90af651dbbfb12263644120160202151021/download?recipient_id=&security_hash=06753a&password=&ie=false...
Traceback (most recent call last):
File "wetransfer.py", line 127, in
main(sys.argv[1:])
File "wetransfer.py", line 119, in main
download(file_id, recipient_id, security_hash)
File "wetransfer.py", line 34, in download
r = requests.get(download_data['direct_link'], stream=True)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 55, in get
return request('get', url, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 455, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 558, in send
r = adapter.send(request, *_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
raise SSLError(e)

requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

my version of python is 2.7.6
pip 8.0.2
very thank!!

direct_link problem

Hi,

I had a problem with the direct_link. The script couldn't find the filename.

Solved it by changing a piece of code to:

if 'direct_link' in download_data:
    direct_link_path = urlparse(download_data['direct_link']).path
    direct_link_path = direct_link_path.split('/')
    file_name = direct_link_path[-1]

    r = requests.get(download_data['direct_link'], stream=True)
else:

Using:
Python 2.7.11
OS X 10.10.5

No open-source license

Hello, I'm trying to use this script to download WeTransfer videos in my Python script, but because there are no open-source licenses I cannot include the script inside my project. Can an open-source license be added? Thanks!

download_data['fields']['filename'] KeyError: 'fields'

$ python wetransfer.py -u [snip]
Downloading [snip]
Traceback (most recent call last):
  File "wetransfer.py", line 127, in <module>
    main(sys.argv[1:])
  File "wetransfer.py", line 119, in main
    download(file_id, recipient_id, security_hash)
  File "wetransfer.py", line 36, in download
    file_name = download_data['fields']['filename']
KeyError: 'fields'

Handling of missing recipient_id

I am not a python expert so writing the changes in kind of hard.

The basic idea is that the links can sometimes be file_id/security_hash, note the missing recipient_id.

It wold be nice to have an IF check if security_hash is blank, and if so use the value from recipient_id, and blank the recipient_id.

Short links

Sample link,

http://we.tl/FV7uNp8Thc

For this type of link, the only way to get-it, is to do a first request, and then disassemble the redirect.

And from then apply current logic.

New way of getting directlink from weTransfer

If someone is wondering why weTransfer is nog working anymore since this weekend (2017-07-15). It is because weTransfer changed some things. Normally you would get the json object with directlink by making an URL like this.

https://wetransfer.com/api/ui/transfers/XXXXXXXXXX/ZZZZZZ/download?recipient_id=YYYYYYYYYY

But now you have to do it like this:

https://wetransfer.com/api/ui/transfers/XXXXXXXXXX/ZZZZZZ/download as a POST request. In the same request you need to upload the recipient id wrapped in a json object like this.

{"recipient_id":"<recipient_id>"}

It's not longer works anymore

Just trying to download we transfer, it's looks sucessfull:

$python py-wetransfer/wetransfer.py https://www.wetransfer.com/downloads/xxxxx
Downloading https://www.wetransfer.com/api/v1/transfers/xxxx/download?recipient_id=xxx&security_hash=xxx&password=&ie=false...
100% 689/689
Finished! FA%2009.psd

But the content of file is:

$cat FA%2009.psd

<TITLE>ERROR: The request could not be satisfied</TITLE>

ERROR

The request could not be satisfied.


This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests.


Generated by cloudfront (CloudFront)
Request ID: PqFHOAJxOeySmYQuXFgCf0ESFQN2-VZDn7qe_QAVQ3tMOfxknDewOw==

upload file ?

would be amazing to get a cli option to upload :)

Precess being killed

Hi, when I try to download a WeTrasnfer URL (1.6GB of data) it starts downloading, but after a while it says: Killed:

chris@loki:~/py-wetransfer$ python wetransfer.py -u https://www.wetransfer.com/downloads/5c518bc17beda289ed82f21e26450d6520131228191355/4a779270fbd97a47fde53823f695821620131228191355/#part removed#
Downloading https://www.wetransfer.com/api/v1/transfers/5c518bc17beda289ed82f21e26450d6520131228191355/download?recipient_id=4a779270fbd97a47fde53823f695821620131228191355&security_hash=#part removed#&password=&ie=false...
Killed

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.