Bump version: 0.27.0 → 0.27.1
This commit is contained in:
parent
b80fa43e99
commit
5ce4c62f22
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
__author__ = """Eriks Karls"""
|
__author__ = """Eriks Karls"""
|
||||||
__email__ = "eriks@72.lv"
|
__email__ = "eriks@72.lv"
|
||||||
__version__ = "0.27.0"
|
__version__ = "0.27.1"
|
||||||
|
|
||||||
from erepublik.citizen import Citizen
|
from erepublik.citizen import Citizen
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class SlowRequests(Session):
|
|||||||
|
|
||||||
fd_path = "debug/requests"
|
fd_path = "debug/requests"
|
||||||
fd_time = self.last_time.strftime("%Y/%m/%d/%H-%M-%S")
|
fd_time = self.last_time.strftime("%Y/%m/%d/%H-%M-%S")
|
||||||
fd_name = utils.slugify(url[len(CitizenBaseAPI.url):])
|
fd_name = utils.slugify(url[len(CitizenBaseAPI.url) :])
|
||||||
fd_extra = "_REDIRECT" if redirect else ""
|
fd_extra = "_REDIRECT" if redirect else ""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -191,7 +191,8 @@ class CitizenBaseAPI:
|
|||||||
session_hash = hashlib.sha256(",".join(env["l"] + env["s"]).encode("utf8")).hexdigest()
|
session_hash = hashlib.sha256(",".join(env["l"] + env["s"]).encode("utf8")).hexdigest()
|
||||||
cookies_hash = hashlib.sha256(",".join(env["c"]).encode("utf8")).hexdigest()
|
cookies_hash = hashlib.sha256(",".join(env["c"]).encode("utf8")).hexdigest()
|
||||||
|
|
||||||
cookie_kwargs = dict(expires=int(time.time()) + 120, path="/en/main/sessionUnlock", domain=".www.erepublik.com", secure=True, rest={"HttpOnly": True}
|
cookie_kwargs = dict(
|
||||||
|
expires=int(time.time()) + 120, path="/en/main/sessionUnlock", domain=".www.erepublik.com", secure=True, rest={"HttpOnly": True}
|
||||||
)
|
)
|
||||||
self._req.cookies.set("sh", session_hash, **cookie_kwargs)
|
self._req.cookies.set("sh", session_hash, **cookie_kwargs)
|
||||||
self._req.cookies.set("ch", cookies_hash, **cookie_kwargs)
|
self._req.cookies.set("ch", cookies_hash, **cookie_kwargs)
|
||||||
|
@ -7,7 +7,7 @@ from decimal import Decimal
|
|||||||
from itertools import product
|
from itertools import product
|
||||||
from threading import Event
|
from threading import Event
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from typing import Any, Dict, List, NoReturn, Optional, Set, Tuple, Union, TypedDict
|
from typing import Any, Dict, List, NoReturn, Optional, Set, Tuple, TypedDict, Union
|
||||||
|
|
||||||
from requests import HTTPError, RequestException, Response
|
from requests import HTTPError, RequestException, Response
|
||||||
|
|
||||||
@ -288,9 +288,11 @@ class BaseCitizen(access_points.CitizenAPI):
|
|||||||
message: str
|
message: str
|
||||||
result: Optional[List[ApiResult]]
|
result: Optional[List[ApiResult]]
|
||||||
|
|
||||||
solve_data = ApiReturn(**self.post(
|
solve_data = ApiReturn(
|
||||||
"https://api.erep.lv/captcha/api", data=dict(citizen_id=self.details.citizen_id, src=src, password="CaptchaDevAPI")
|
**self.post(
|
||||||
).json())
|
"https://api.erep.lv/captcha/api", data=dict(citizen_id=self.details.citizen_id, src=src, password="CaptchaDevAPI")
|
||||||
|
).json()
|
||||||
|
)
|
||||||
if solve_data["status"]:
|
if solve_data["status"]:
|
||||||
return solve_data["result"]
|
return solve_data["result"]
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.27.0
|
current_version = 0.27.1
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?
|
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?
|
||||||
|
2
setup.py
2
setup.py
@ -50,6 +50,6 @@ setup(
|
|||||||
test_suite="tests",
|
test_suite="tests",
|
||||||
tests_require=test_requirements,
|
tests_require=test_requirements,
|
||||||
url="https://github.com/eeriks/erepublik/",
|
url="https://github.com/eeriks/erepublik/",
|
||||||
version="0.27.0",
|
version="0.27.1",
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user