fix pagination next url
This commit is contained in:
parent
2da9d56ddf
commit
4768d37d36
@ -25,6 +25,10 @@ only-include = ["src"]
|
|||||||
"src" = "whereis_client"
|
"src" = "whereis_client"
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
|
line-length = 88
|
||||||
|
target-version = "py310"
|
||||||
|
|
||||||
|
[tool.ruff.lint]
|
||||||
select = ["E", "F", "I"]
|
select = ["E", "F", "I"]
|
||||||
ignore = []
|
ignore = []
|
||||||
|
|
||||||
@ -34,11 +38,7 @@ exclude = [
|
|||||||
"venv",
|
"venv",
|
||||||
]
|
]
|
||||||
|
|
||||||
line-length = 88
|
[tool.ruff.lint.mccabe]
|
||||||
|
|
||||||
target-version = "py310"
|
|
||||||
|
|
||||||
[tool.ruff.mccabe]
|
|
||||||
max-complexity = 10
|
max-complexity = 10
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
mypy===1.13.0
|
mypy===1.13.0
|
||||||
ruff==0.8.3
|
ruff>=0.9.6
|
||||||
twine==6.0.1
|
twine==6.0.1
|
||||||
types-requests==2.32.0.20241016
|
types-requests==2.32.0.20241016
|
||||||
hatch==1.14.0
|
hatch==1.14.0
|
||||||
@ -2,4 +2,4 @@ from .client import Client, OrderField
|
|||||||
|
|
||||||
__all__ = ["Client", "OrderField"]
|
__all__ = ["Client", "OrderField"]
|
||||||
|
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.1.1"
|
||||||
|
|||||||
@ -541,6 +541,10 @@ class Client:
|
|||||||
gps_url += f"?date_end={de.isoformat()}"
|
gps_url += f"?date_end={de.isoformat()}"
|
||||||
|
|
||||||
while gps_url is not None:
|
while gps_url is not None:
|
||||||
|
# pagination api next url returns http scheme instead of https
|
||||||
|
if self.base_url.startswith("https"):
|
||||||
|
gps_url = gps_url.replace("http://", "https://")
|
||||||
|
|
||||||
logging.info(f"get gps data from: {gps_url}")
|
logging.info(f"get gps data from: {gps_url}")
|
||||||
|
|
||||||
data = self._get_paginate_gps_positions(gps_url)
|
data = self._get_paginate_gps_positions(gps_url)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user