Skip to content

JSONDecodeError: Expecting value: line 1 column 1 (char 0) #2

@Jrol123

Description

@Jrol123

The error is connected to the multi-tag system.
Adding spaces between tags makes the system go nuts.
To fix this, i added the replace line to the _client.py file

def search(
        self,
        tags: str,
        *,
        limit: Union[int, None] = None,
        page: Union[int, None] = None,
    ) -> List[Post]:
        tags = tags.replace(" ", "%20")
        add_params = {"tags": tags, "limit": limit, "pid": page}
        data = self.get(self.post_params, add_params).json()
        return list(map(lambda x: Post(**x), data))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions