Issue with python jenkins api library

I would like to ask, when I use python to call jenkinsapi, when I use the get_jobs method to get the job details, it returns an error and the target computer actively rejects it, and the address I request is not the same as the address output by the console (for example: the one I requested It happened, but it returned (the address 20 was the address I used when I called the api for the first time)), then I tried to clear the cache of pycharm and found that the same problem was reported. , I’m a little confused.

I don’t understand this question.

Can you show the code you are using to call it, and what error your getting, and why a different ip matters?

Hello, the picture is my code. I use the domain name to resolve and call it through the api. The address I hit mosaic below is the wrong address. The address below is, but it should be 221.122. 92.198

So not going to be a lot of help, but I notice

Privoxy in your error message. Is this possibly something your proxy is returning? Do you need to go through the proxy to your jenkins? You might need to set NO_PROXY env variable or something

Secondly, it looks like the jenkinsapi project is external to the jenkins project. GitHub - pycontribs/jenkinsapi: A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers and that it may not be active anymore

If you paste the full traceback here we might be better able to understand what is happening.

Is the issue really that your DNS is returning incorrect results? python requests module is simply going to use what ever the local dns resolution is.