Skip to content

Instantly share code, notes, and snippets.

@sangheonhan
Created March 30, 2023 06:59
Show Gist options
  • Save sangheonhan/7be45d9727a88f0461a6ca2148fdcd2d to your computer and use it in GitHub Desktop.
Save sangheonhan/7be45d9727a88f0461a6ca2148fdcd2d to your computer and use it in GitHub Desktop.
The code retrieves and prints a list of GitHub's IP addresses from the meta API endpoint.
import requests
response = requests.get('https://api.github.com/meta')
data = response.json()
ip_addresses = data['hooks']
print(ip_addresses)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment