pyarr
pyarr copied to clipboard
Does pyarr supports https?
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behaviour
I have implemented pyarr in my project and i am trying to connect to lidarr via https but it fails.
Steps To Reproduce
Run the code I attached
Expected behaviour
Connect to lidarr via https
Pyarr Version
5.2.0
Python Version
3.10
Example Code
from pyarr import LidarrAPI
ipaddress="127.0.0.1"
port="8686"
base_api_path=""
ssl="https"
api_token="xxxxxxxxxxxx"
lidarr_url = ssl + "://" + ipaddress + ":" + port + base_api_path
lidarr_client = LidarrAPI(lidarr_url,api_token)
lidarr_client.get_artist()
Relevant log output
2024-09-18 10:20:35 ERROR <class 'pyarr.exceptions.PyarrBadRequest'> subsonic_helper.py 153
Traceback (most recent call last):
File "/home/user/spotisub/./spotisub/helpers/subsonic_helper.py", line 153, in write_playlist
is_monitored = lidarr_helper.is_artist_monitored(artist_name_spotify)
File "/home/user/spotisub/./spotisub/helpers/lidarr_helper.py", line 29, in is_artist_monitored
artists_list = lidarr_client.get_artist()
File "/home/user/.local/lib/python3.10/site-packages/pyarr/lidarr.py", line 116, in get_artist
return self._get(
File "/home/user/.local/lib/python3.10/site-packages/pyarr/request_handler.py", line 91, in _get
response = _process_response(res)
File "/home/user/.local/lib/python3.10/site-packages/pyarr/request_handler.py", line 233, in _process_response
raise PyarrBadRequest(f"Bad Request, possibly a bug. {str(res.content)}")
pyarr.exceptions.PyarrBadRequest: Bad Request, possibly a bug. b'<html>\r\n<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n<body>\r\n<center><h1>400 Bad Req
uest</h1></center>\r\n<center>The plain HTTP request was sent to HTTPS port</center>\r\n<hr><center>nginx/1.26.2</center>\r\n</body>\r\n</html>\r\n'
Code of Conduct
- [X] I agree to follow this project's Code of Conduct