G
G
Grand Silence2017-01-22 03:01:44
Parsing
Grand Silence, 2017-01-22 03:01:44

How to get all data limited by LIMIT for a query like LIKE?

I'm thinking about an algorithm for getting all the data from the server for the minimum number of requests. The maximum number of rows returned by the server is 50, there is no pagination.
The procedure for obtaining data is as follows:

  1. The client requests from the server strings * matching the string query (similar to LIKE in SQL)
  2. The server searches for a substring in all data and returns a maximum of 50 results or less (similar to LIMIT 50)

* string - a word with a length of 2 letters or more, consisting of Cyrillic OR Latin (it is impossible to use both Cyrillic and Latin at the same time) and without numbers.
This is how a request to the server looks like (the arrow points to the input field):
07a5f7b5390e4cb9995bc3168d859b2f.PNG
How to compose the entire database of search queries (dictionary) in such a way as to select all data from the server? At the same time, do it as efficiently as possible, for a smaller number of calls to the server. Do not sort through all the characters...
Important note : Keep in mind that there are all possible output data by the server (the entire database of nicknames, i.e. strings that the server can output).
I audit online players for a client, nothing criminal

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2017-01-23
@mixtape774

all letters must be sorted out. but this is only the first time.
then when you have received all the nicknames, you can calculate all the 2-letter letters that are required to get all the players. for example, it is stupid to collect the first 2 letters from all nicknames. I think there will be hundreds of them. which to use for enumeration later. when adding new players, either iterate over everything again, but with a high probability these players will pair with the existing characters (look at the total number of parsed.)
There is no other way, unless you find some other not insignificant detail in their api.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question