naturalis / nbclassify

Proof of concept demonstrating identification of species images using artificial neural networks.
Apache License 2.0
1 stars 3 forks source link

consolidate Flickr authentication #13

Open rvosa opened 7 years ago

rvosa commented 7 years ago

The scripts nbc-add-tags and nbc-harvest-images each use a different kind of authentication, based on a different version of the Flickr API. This needs to be consolidated into a common form of authentication, using the most recent version of the Flickr API.

Saskiadv commented 7 years ago

Both scripts now use the most recent version of the API. The first time the connection is made with this method, a webpage will open to verify the connection. Because it is not (yet) possible to verify this connection in the cloud environment, these scripts can't be run on the cloud.

rvosa commented 7 years ago

Or, more precisely, we don't yet know how to confirm the authentication using a text browser. We know that something (perhaps lynx) opens up but clicking OK and continuing isn't quite working.

rvosa commented 7 years ago

When the flickrapi attempts to authenticate for the first time, a browser window is spawned that in turn contacts a locally running HTTP server to exchange the OAuth token. This token is then saved in a tiny SQLite database saved by default as ~/.flickr/oauth-tokens.sqlite.

This procedure is problematic on headless servers that can't spawn browser GUIs. Under some configurations, a Lynx text browser appears instead, but it is unresponsive. However, the solution is simply to copy the file added in commit 428708d17c3db09f556034b7fbc1b1e76a97714a to the ~/.flickr folder on the server. Authentication then proceeds without problems.