File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ jobs:
19
19
extra_args : --hook-stage manual --all-files
20
20
21
21
build :
22
-
23
- runs-on : ubuntu-latest
22
+ name : Build for Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
23
+ runs-on : ${{ matrix.runs-on }}
24
24
strategy :
25
25
fail-fast : false
26
26
matrix :
27
- python-version : ["3.7", "3.8", "3.9", "3.10"]
27
+ python-version : [ "3.7", "3.8", "3.9", "3.10"]
28
+ runs-on : [ubuntu-latest, macos-latest, windows-latest]
28
29
29
30
steps :
30
31
- uses : actions/checkout@v2
Original file line number Diff line number Diff line change 21
21
url = per_info [i ]
22
22
print (url )
23
23
data = requests .get (url = url )
24
- empty_list .append (data .json ())
24
+ requests_status = "unknown"
25
+ while (requests_status == "unknown" ) or (requests_status == "unsuccessful" ):
26
+ if data .status_code == 200 :
27
+ requests_status = "successful"
28
+ empty_list .append (data .json ())
29
+ else :
30
+ # handle failure on requests to the url for mac os
31
+ requests_status = "unsuccessful"
32
+ print (f"Failed to get data from: { url } " )
33
+ # make request again to get data from the url
34
+ data = requests .get (url = url )
25
35
26
36
df1 = pd .DataFrame (empty_list )
27
37
df1 ["name" ] = df1 ["name" ].fillna ("" )
You can’t perform that action at this time.
0 commit comments