Coder Social home page Coder Social logo

tuenti-downloader's Introduction

Tuenti downloader

This is a really easy to use tool, just python setup.py install it, be sure to have your user and password and execute it like td user_email user_password

Easy install steps, that will allow you to make changes to the code without having to do anything else.

Steps to use

  • Install: * virtualenv (python2-virtualenv) * git (git) * optionally libgexiv2 (libgexiv2 in archlinux)
  • Create a folder (mkdir tuenti) and get into it (cd tuenti)
  • Clone like git clone https://github.com/txomon/tuenti-downloader
  • Create virtualenv (virtualenv2 ve or virtualenv ve depending on default)
  • Activate virtualenv (source ve/bin/activate)
  • Remove global package lock (rm ve/lib/python2.7/no-global-site-packages.txt)
  • Get in tuenti-downloader (cd tuenti-downloader)
  • Install it (python setup.py develop)
  • Go one up (cd ..)
  • Use it (td user_name user_password)

To update

  • Get in tuenti/tuenti-downloader
  • Update it with git pull
  • Go one up (cd ..)
  • Use it (td user_name user_password)

Support

I have opened this chat room https://gitter.im/txomon/tuenti-downloader just in case you want to ask something, as I prefer that to being privately asked.

TODO

If you want to contribute, there are some ideas on the TODO file

Disclaimer

I release this because I have been able to backup all my photos with it and it has been developed using other open source. I firmly believe that you shouldn't hack into it any more but to polish a little the algorithm because you could really end up scrapping all Tuenti.

The filter at the moment works by scraping all your albums, seeing who has talked there and scrapping them looking for photos where you have been tagged or commented.

The API I was able to find didn't implement anything else to create more logic, so it's up to you.

Don't do evil

tuenti-downloader's People

Contributors

txomon avatar

Stargazers

Carlos Aguilar avatar Eugenio Cuevas avatar

Watchers

 avatar Sergio Ruiz avatar James Cloos avatar  avatar

tuenti-downloader's Issues

Stopped when already downloading

Buenas,

No estaba seguro de si crear un nuevo hilo, pero entiendo que es otro problema. Al tema:

INFO:root:Downloaded 1638/44900 photos ERROR:root:Failed but retrying for 0-th time Traceback (most recent call last): File "td.py", line 41, in really_retry yield File "td.py", line 57, in get_user_album_photos res = tsm.Profile_getAlbumPhotos({'page': page, 'pageSize': 1000, 'userId': user}) File "/usr/local/lib/python2.7/dist-packages/python_tuenti-1.1.0-py2.7.egg/tuenti/tuenti.py", line 90, in request ((method, params),), return_request, extra_requests) File "/usr/local/lib/python2.7/dist-packages/python_tuenti-1.1.0-py2.7.egg/tuenti/tuenti.py", line 100, in mrequest return req.json() File "/usr/local/lib/python2.7/dist-packages/requests-2.0.1-py2.7.egg/requests/models.py", line 693, in json return json.loads(self.text, **kwargs) File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 413, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 402, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 420, in raw_decode raise JSONDecodeError("No JSON object could be decoded", s, idx) JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0) Traceback (most recent call last): File "td.py", line 194, in <module> main() File "td.py", line 183, in main for photo in get_user_album_photos(tsm, user_id): File "td.py", line 59, in get_user_album_photos res = tsm.Profile_getAlbumPhotos({'page': page, 'pageSize': 1000}) File "/usr/lib/python2.7/contextlib.py", line 36, in __exit__ raise RuntimeError("generator didn't stop after throw()") RuntimeError: generator didn't stop after throw()

Si sirve de algo, iba por el user 80/204.

Supongo que simplemente se ha encontrado con un caso concreto en el que la api (o el parseo o yo que sé) no ha devuelto un JSON valido y valdría con tener esto en cuenta y pasar al siguiente o lo que sea.

Can't make it to work

Mensaje de error:

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api-msngr.tuenti.com
INFO:root:Users 1/1
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): imrl.tuenti.net
Traceback (most recent call last):
File "td.py", line 152, in <module>
main()
File "td.py", line 146, in main
file_downloader.save_photo(photo)
File "td.py", line 63, in save_photo
if self.download_file(file_uri, file_path):
File "td.py", line 48, in download_file
with open(file_path, 'wb') as f:
IOError: [Errno 2] No such file or directory: u'dl/1ciOz9Xb6qLsx5wX_A5-q2QA.jpg'

Cabe destacar que, debido a que no dispongo de la libreria libgexiv2, he tenido que borrar el try catch relacionado con ella.

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.