Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- IP='1.1.1.1'
- API_URL = 'https://ipinfo.io/' + IP
- TOKEN = "<TOKEN>"
- headers = {
- 'user-agent': 'CliClient/Python3.7',
- 'accept': 'application/json',
- 'authorization': 'Bearer {}'.format(TOKEN)
- }
- request = requests.get(API_URL ,headers=headers)
- for req in request:
- print(req.decode("utf-8"))
Advertisement
Add Comment
Please, Sign In to add comment