Python Forum
A lot of confusion and I can't seem to solve this issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A lot of confusion and I can't seem to solve this issue
#5
Ok if it like that can use Requests,the curl command would be like this in Requests.
import requests

response = requests.get('http://118.31.106.59:9200/_cat/indices')
print(response.text.strip())

# Parse out ip
ip = response.url.split('/')[2]
print(ip)
Output:
green open .geoip_databases vtWge-U1SLefV6CuavYxCQ 1 0 40 40 37.7mb 37.7mb 118.31.106.59:9200
Reply


Messages In This Thread
RE: A lot of confusion and I can't seem to solve this issue - by snippsat - Jul-24-2022, 07:26 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020