forked from 5ec1cff/TrickyStore
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsearch4.py
More file actions
16 lines (15 loc) · 702 Bytes
/
search4.py
File metadata and controls
16 lines (15 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import urllib.request
import urllib.parse
import json
url = "https://api.github.com/repos/github/codeql-action/issues?state=all&q=" + urllib.parse.quote("CodeQL analyses from advanced configurations cannot be processed when the default setup is enabled")
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0', 'Accept': 'application/vnd.github.v3+json'})
try:
response = urllib.request.urlopen(req).read().decode('utf-8')
data = json.loads(response)
for issue in data[:5]:
print(f"Title: {issue['title']}")
print(f"URL: {issue['html_url']}")
print(f"Body snippet: {issue['body'][:200]}...")
print("---")
except Exception as e:
print(e)