diff options
| author | Yuval Adam <_@yuv.al> | 2025-05-14 23:15:50 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-05-14 23:15:50 +0200 |
| commit | 114b480a24d074b3c1787ffa9d75abce168d0b37 (patch) | |
| tree | 2d85116ca2b829b5da1d00aa7149c9c17662eb0c | |
| parent | bea157ef5a42f732a0eb9a3fc15e3abc14cf3148 (diff) | |
Skip empty objects
| -rw-r--r-- | pakarlib/fetch.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pakarlib/fetch.py b/pakarlib/fetch.py index f26f3e4..9ba6e7e 100644 --- a/pakarlib/fetch.py +++ b/pakarlib/fetch.py @@ -58,6 +58,8 @@ def get_polygons(): print(f"{i} - got CDATA error, skipping") if "Request unsuccessful" in res.text: print(f"{i} - got incapsula error, skipping") + if '"{}"' in res.text: + print(f"{i} - got empty object, skipping") else: with open(DATA_DIR / "polygons" / f"{i}.json", "wb") as f: cont = res.content |
