Giter Club home page Giter Club logo

blip's Introduction

blip

A backup/preview utility for blipfoto.com

Sometimes, just sometimes, you might want to backup your blips: this does a very basic job. It will:

  • create a new directory with your username
  • starting from the most recent entry, work backwards until no previous entry is found
  • for each entry save:
  • content.json (the page content including comments, ratings and metadata)
  • image.jpg (the standard resolution image)

There are some limitations:

  • I didn't figure out how to get the high-res image
  • it will sleep for 2s between fetching each entry to avoid spamming blipfoto's servers

To run you'll need python3 (2 should probably work too) and http://docs.python-requests.org/en/latest/

To run you'll need to get your own API credentials. To do this:

  1. go here
  2. click "Apps"
  3. click "Create a new app"
  4. fill in name, select type = distributed application, redirect URI (this can be anything e.g. myapp://blipfoto) and check the box agreeing to the rules
  5. submit

You should now have a registered app and a page telling you your access token and base API endpoint. Take these and put them in the script (look for the variables with a "fill me in" comment).

Okay, now it's ready to go!

  • python3 previewer.py username (entry_id) (for me: username is tpd)

You can optionally specify as the third argument the starting entry id; this is usually a number e.g. 2642461 (an old one; longer for new entries).

I've only tested this on Linux; if anyone would like to test and fix on OS X or windows please do.

blip's People

Contributors

timdewhirst avatar

Stargazers

Stephanie Kemna avatar  avatar

Watchers

 avatar Rich Somerfield avatar Stephanie Kemna avatar  avatar

Forkers

moffata64

blip's Issues

Recursion Depth

After pulling 963 blips, I ran into the following error:

File "previewer.py", line 18, in getAndSaveImage
r=requests.get(url, headers={'Authorization':'Bearer '+accesstoken})
File "/usr/lib/python3/dist-packages/requests/api.py", line 55, in get
return request('get', url, *_kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 43, in request
session = sessions.Session()
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 315, in init
self.mount('https://', HTTPAdapter())
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 86, in init
self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 119, in init_poolmanager
block=block)
File "/usr/lib/python3/dist-packages/urllib3/poolmanager.py", line 69, in init
dispose_func=lambda p: p.close())
File "/usr/lib/python3/dist-packages/urllib3/_collections.py", line 42, in init
self._container = self.ContainerCls()
File "/usr/lib/python3.4/collections/init.py", line 56, in init
self.__update(_args, **kwds)
File "/usr/lib/python3.4/_collections_abc.py", line 576, in update
if isinstance(other, Mapping):
File "/usr/lib/python3.4/abc.py", line 188, in instancecheck
subclass in cls._abc_negative_cache):
File "/usr/lib/python3.4/_weakrefset.py", line 75, in contains
return wr in self.data
RuntimeError: maximum recursion depth exceeded in comparison

Rerunning now ..

import json

not really an issue but you are importing the json library but is not being used at all - I am using mac will report any issues/fixes

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.