Added fuzzy search by StackOverflow

This commit is contained in:
Soxoj
2021-05-10 00:39:36 +03:00
parent ee36dc0187
commit 5912ad4fbc
3 changed files with 25 additions and 5 deletions
+19
View File
@@ -27643,6 +27643,25 @@
"tags": [
"news"
]
},
"StackOverflow": {
"similarSearch": true,
"absenceStrs": [
"no-search-results"
],
"presenseStrs": [
"user-info",
" user-details"
],
"url": "https://stackoverflow.com/users/filter?search={username}",
"urlMain": "https://stackoverflow.com",
"usernameClaimed": "maigret",
"usernameUnclaimed": "noonewouldeverusethis7",
"checkType": "message",
"alexaRank": 44,
"tags": [
"coding"
]
}
},
"engines": {
+3 -2
View File
@@ -1,5 +1,5 @@
## List of supported sites (search methods): total 2487
## List of supported sites (search methods): total 2488
Rank data fetched from Alexa by domains.
@@ -23,6 +23,7 @@ Rank data fetched from Alexa by domains.
1. ![](https://www.google.com/s2/favicons?domain=https://naver.com) [Naver (https://naver.com)](https://naver.com)*: top 50, kr*
1. ![](https://www.google.com/s2/favicons?domain=https://developer.apple.com/forums) [AppleDeveloper (https://developer.apple.com/forums)](https://developer.apple.com/forums)*: top 50, forum, us*
1. ![](https://www.google.com/s2/favicons?domain=https://discussions.apple.com/) [AppleDiscussions (https://discussions.apple.com/)](https://discussions.apple.com/)*: top 50, us*
1. ![](https://www.google.com/s2/favicons?domain=https://stackoverflow.com) [StackOverflow (https://stackoverflow.com)](https://stackoverflow.com)*: top 50, coding*
1. ![](https://www.google.com/s2/favicons?domain=https://allods.mail.ru) [Allods (https://allods.mail.ru)](https://allods.mail.ru)*: top 50, forum, gaming, ru*
1. ![](https://www.google.com/s2/favicons?domain=https://aa.mail.ru) [ArcheAge (https://aa.mail.ru)](https://aa.mail.ru)*: top 50, forum, gaming, ru*
1. ![](https://www.google.com/s2/favicons?domain=https://cfire.mail.ru) [Crossfire (https://cfire.mail.ru)](https://cfire.mail.ru)*: top 50, gaming, ru*
@@ -2491,4 +2492,4 @@ Rank data fetched from Alexa by domains.
1. ![](https://www.google.com/s2/favicons?domain=https://morguefile.com) [morguefile.com (https://morguefile.com)](https://morguefile.com)*: top 100M, photo*
1. ![](https://www.google.com/s2/favicons?domain=https://wls.social) [wls.social (https://wls.social)](https://wls.social)*: top 100M, blog*
Alexa.com rank data fetched at (2021-05-09 20:17:01.680061 UTC)
Alexa.com rank data fetched at (2021-05-09 21:38:48.827253 UTC)
+3 -3
View File
@@ -74,7 +74,7 @@ if __name__ == '__main__':
dest="base_file", default="maigret/resources/data.json",
help="JSON file with sites data to update.")
parser.add_argument('--without-rank', help='update with use of local data only', action='store_true')
parser.add_argument('--with-rank', help='update with use of local data only', action='store_true')
parser.add_argument('--empty-only', help='update only sites without rating', action='store_true')
parser.add_argument('--exclude-engine', help='do not update score with certain engine',
action="append", dest="exclude_engine_list", default=[])
@@ -94,7 +94,7 @@ Rank data fetched from Alexa by domains.
""")
for site in sites_subset:
if args.without_rank:
if not args.with_rank:
break
url_main = site.url_main
if site.alexa_rank < sys.maxsize and args.empty_only:
@@ -106,7 +106,7 @@ Rank data fetched from Alexa by domains.
pool.append((site.name, url_main, th))
th.start()
if not args.without_rank:
if args.with_rank:
index = 1
for site_name, url_main, th in pool:
th.join()