AlexandreSenpai / Enma

Enma is a Python library designed to fetch and download manga and doujinshi data from many sources including Manganato and NHentai.
MIT License
80 stars 16 forks source link

URL Params for Search get encoded #29

Closed calibear20 closed 6 months ago

calibear20 commented 2 years ago

Hello,

I had some issues doing a multi tag search with this module as in

but when I plugged that into your Search Function the params would get changed to:

locally I added this line your search function in nhentai.py and it solves the problem.

    params = {'query': str(query), 'page': page, 'sort': sort} if sort is not None else {'query': query, 'page': page}

++params = urllib.parse.urlencode(params, safe=':+ ') SOUP = self._fetch(urljoin(self._API_URL, f'galleries/search'), params=params, is_json=True)

thanks,

calibear20

PS i suck at github

https://stackoverflow.com/questions/23496750/how-to-prevent-python-requests-from-percent-encoding-my-urls/23497912