From 8a865a1ce6dc85887fb29881672714a6cd3cdea3 Mon Sep 17 00:00:00 2001 From: Soxoj <31013580+soxoj@users.noreply.github.com> Date: Sat, 26 Feb 2022 14:16:13 +0300 Subject: [PATCH] Op.gg fixes (#363) * Fixed op.gg sites * Added testing docs, fixed some error * Updated site list and statistics --- docs/source/development.rst | 31 +++++++++++++++ maigret/checking.py | 2 +- maigret/resources/data.json | 76 +++++++++++-------------------------- sites.md | 2 +- 4 files changed, 55 insertions(+), 56 deletions(-) diff --git a/docs/source/development.rst b/docs/source/development.rst index 95ae37a..c17ed63 100644 --- a/docs/source/development.rst +++ b/docs/source/development.rst @@ -3,6 +3,37 @@ Development ============== +Testing +------- + +It is recommended use Python 3.7/3.8 for test due to some conflicts in 3.9. + +Install test requirements: + +.. code-block:: console + + pip install -r test-requirements.txt + + +Use the following commands to check Maigret: + +.. code-block:: console + + # run linter and typing checks + # order of checks% + # - critical syntax errors or undefined names + # - flake checks + # - mypy checks + make lint + + # run testing with coverage html report + # current test coverage is 60% + make text + + # open html report + open htmlcov/index.html + + How to publish new version of Maigret ------------------------------------- diff --git a/maigret/checking.py b/maigret/checking.py index a196cfc..b281287 100644 --- a/maigret/checking.py +++ b/maigret/checking.py @@ -132,7 +132,7 @@ class SimpleAiohttpChecker(CheckerBase): error = CheckError("Unexpected", str(e)) if error == "Invalid proxy response": - self.logger.debug(e, exc_info=True) + self.logger.debug(error, exc_info=True) return str(html_text), status_code, error diff --git a/maigret/resources/data.json b/maigret/resources/data.json index d2673a8..c9fb0a9 100644 --- a/maigret/resources/data.json +++ b/maigret/resources/data.json @@ -16574,12 +16574,7 @@ "br", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://br.op.gg/", "url": "https://br.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -17120,12 +17115,7 @@ "gaming", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://eune.op.gg/", "url": "https://eune.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -17136,12 +17126,7 @@ "gaming", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://euw.op.gg/", "url": "https://euw.op.gg/summoner/userName={username}", "usernameClaimed": "blue", @@ -18080,12 +18065,7 @@ "tags": [ "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://lan.op.gg/", "url": "https://lan.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -18096,12 +18076,7 @@ "gaming", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://las.op.gg/", "url": "https://las.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -18485,12 +18460,7 @@ "tags": [ "gaming" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://na.op.gg/", "url": "https://na.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -18670,12 +18640,7 @@ "gaming", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://oce.op.gg/", "url": "https://oce.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -19142,12 +19107,7 @@ "ru", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://ru.op.gg/", "url": "https://ru.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -19694,12 +19654,7 @@ "tr", "us" ], - "checkType": "message", - "presenseStrs": "common.SummonerHistory.Favorite", - "absenceStrs": [ - "SummonerNotFoundLayout" - ], - "alexaRank": 331, + "engine": "op.gg", "urlMain": "https://tr.op.gg/", "url": "https://tr.op.gg/summoner/userName={username}", "usernameClaimed": "adam", @@ -29054,6 +29009,19 @@ "404" ] } + }, + "op.gg": { + "name": "op.gg", + "site": { + "checkType": "message", + "presenseStrs": [ + "
" + ], + "absenceStrs": [ + "

This summoner is not registered" + ], + "alexaRank": 331 + } } }, "tags": [ diff --git a/sites.md b/sites.md index 6bd93d0..37523c4 100644 --- a/sites.md +++ b/sites.md @@ -2599,7 +2599,7 @@ Rank data fetched from Alexa by domains. 1. ![](https://www.google.com/s2/favicons?domain=https://www.hozpitality.com) [hozpitality (https://www.hozpitality.com)](https://www.hozpitality.com)*: top 100M* 1. ![](https://www.google.com/s2/favicons?domain=https://kazanlashkigalab.com) [kazanlashkigalab.com (https://kazanlashkigalab.com)](https://kazanlashkigalab.com)*: top 100M, kz* -Alexa.com rank data fetched at (2022-02-23 22:14:26.029891 UTC) +Alexa.com rank data fetched at (2022-02-26 11:12:43.279519 UTC) ## Statistics Enabled/total sites: 2449/2595