GithubHelp home page GithubHelp logo

pychee's People

Contributors

chostakovitch avatar engineerjoe440 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

engineerjoe440

pychee's Issues

KeyError: "name='XSRF-TOKEN', domain=None, path=None"

First of all thanks for this Library. I want to do a sync script which syncs folders in an album with the same name. The easiest ways seems to be pychee. I tried the sample code first and got this error.

Traceback (most recent call last): File "sync_folder.py", line 6, in <module> client = pychee.LycheeClient('https://foto.hans2.de') File "/home/hans/.local/lib/python3.8/site-packages/pychee/pychee.py", line 69, in __init__ csrf_token = unquote(init_response.cookies['XSRF-TOKEN']) File "/usr/lib/python3/dist-packages/requests/cookies.py", line 328, in __getitem__ return self._find_no_duplicates(name) File "/usr/lib/python3/dist-packages/requests/cookies.py", line 399, in _find_no_duplicates raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path)) KeyError: "name='XSRF-TOKEN', domain=None, path=None"

Any idea what causes this? My Lychee version is 4.5.1.

Thanks!

beginner problems...

Hello

This seems to be what I need, I am trying to automate importing large contunously expandin photo collection to Lychee and Lychees native cli-import does not offer fine grained enough control.

Unfortunately I am total beginner in python and have hard time getting up to speed with pychee.

Could you provide couple of basic examples: how to create new album "X" for user 0, how to import photo to album X

Also a question: can pychee import a photo by symlink, its not very clear to me even after reading through https://github.com/Chostakovitch/pychee/blob/main/pychee/pychee.py

Consider Adding `dataclass` Support for Various Response Models?

As I've been using this library, I've bitten myself a couple times expecting a specific response type that I was not given. I wonder if it would make sense to use Python dataclasses to help constrain response data-structures into a predictable format, making it easier to program against the Lychee API.

What do you think?

Example

@dataclass
class PhotoData:
    some_attribute: str
    another_attr: int

...

    def get_photo(self, photo_id) -> dict:
        """Get information about a photo."""
        data = {'photoID': photo_id}
        response = self._session.post('Photo::get', json=data)
        response.raise_for_status() # Raises an error if an unexpected HTTP response is returned
        return PhotoData(**response.json())

The album i ds must be an array.

I got this error on my server:

Illuminate\Foundation\Http\FormRequest::failedValidation:155 The album i ds must be an array.

This is how I call it:

lychee.set_albums_title(['4go0N77DsRw60KTJ3LHzUxbC'], 'test')

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.