Refactor HTTP common code (#207)
- move to common/http.py, - make fetch_url return a Response.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
from common import http
|
||||
from common import endoflife
|
||||
|
||||
PRODUCT = "typo3"
|
||||
@@ -7,8 +8,8 @@ URL = "https://get.typo3.org/api/v1/release/"
|
||||
print(f"::group::{PRODUCT}")
|
||||
versions = {}
|
||||
|
||||
response = endoflife.fetch_url(URL)
|
||||
data = json.loads(response)
|
||||
response = http.fetch_url(URL)
|
||||
data = json.loads(response.text)
|
||||
for v in data:
|
||||
if v['type'] != 'development':
|
||||
date = v["date"][0:10]
|
||||
|
||||
Reference in New Issue
Block a user