diff --git a/erepublik/access_points.py b/erepublik/access_points.py index fe6cfd8..f859cee 100644 --- a/erepublik/access_points.py +++ b/erepublik/access_points.py @@ -16,13 +16,9 @@ class SlowRequests(Session): uas: List[str] = [ # Chrome 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36', - # noqa 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36', - # noqa 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36', - # noqa 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.106 Safari/537.36', - # noqa 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36', diff --git a/erepublik/citizen.py b/erepublik/citizen.py index 4746766..b7b755f 100644 --- a/erepublik/citizen.py +++ b/erepublik/citizen.py @@ -1905,9 +1905,10 @@ class CitizenMilitary(CitizenTravel): battle.defender.country] + battle.invader.deployed + battle.defender.deployed if self.details.current_country not in involved: count = 0 + side = battle.invader if inv_side else battle.defender errors = deployed_count = 0 while (not deployed_count == count) and errors < 10: - r = self._post_military_deploy_bomb(battle.id, division.id, bomb_id).json() + r = self._post_military_deploy_bomb(battle.id, division.id, side.id, bomb_id).json() if not r.get('error'): deployed_count += 1 elif r.get('message') == 'LOCKED': diff --git a/erepublik/classes.py b/erepublik/classes.py index 3a0a787..e953474 100644 --- a/erepublik/classes.py +++ b/erepublik/classes.py @@ -10,6 +10,7 @@ from requests import Response, Session, post from . import utils, constants __all__ = ['Battle', 'BattleDivision', 'BattleSide', 'Company', 'Config', 'Details', 'Energy', 'ErepublikException', + 'ErepublikNetworkException', 'EnergyToFight', 'Holding', 'MyCompanies', 'MyJSONEncoder', 'OfferItem', 'Politics', 'Reporter', 'TelegramReporter'] diff --git a/erepublik/utils.py b/erepublik/utils.py index 72a4abb..1f20212 100644 --- a/erepublik/utils.py +++ b/erepublik/utils.py @@ -21,10 +21,10 @@ try: except ImportError: import json -__all__ = ['VERSION', 'calculate_hit', 'caught_error', 'date_from_eday', 'eday_from_date', +__all__ = ['VERSION', 'calculate_hit', 'caught_error', 'date_from_eday', 'eday_from_date', 'deprecation', 'get_air_hit_dmg_value', 'get_file', 'get_ground_hit_dmg_value', 'get_sleep_seconds', 'good_timedelta', 'interactive_sleep', 'json', 'localize_dt', 'localize_timestamp', 'normalize_html_json', 'now', - 'process_error', 'process_warning', 'send_email', 'silent_sleep', 'slugify', 'write_file', + 'process_error', 'process_warning', 'send_email', 'silent_sleep', 'slugify', 'write_file', 'write_request', 'write_interactive_log', 'write_silent_log', 'get_final_hit_dmg', 'wait_for_lock'] if not sys.version_info >= (3, 6):