Skip to content

Commit

Permalink
Op.gg fixes (#363)
Browse files Browse the repository at this point in the history
* Fixed op.gg sites

* Added testing docs, fixed some error

* Updated site list and statistics
  • Loading branch information
soxoj authored Feb 26, 2022
1 parent a29c3c6 commit 8a865a1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 56 deletions.
31 changes: 31 additions & 0 deletions docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion maigret/checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async def check(self, future) -> Tuple[str, int, Optional[CheckError]]:
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

Expand Down
76 changes: 22 additions & 54 deletions maigret/resources/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -29054,6 +29009,19 @@
"404"
]
}
},
"op.gg": {
"name": "op.gg",
"site": {
"checkType": "message",
"presenseStrs": [
"<div class=\"profile-icon\">"
],
"absenceStrs": [
"<h2 class=\"header__title\">This summoner is not registered"
],
"alexaRank": 331
}
}
},
"tags": [
Expand Down
2 changes: 1 addition & 1 deletion sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a865a1

Please sign in to comment.