A very quick primer about WS scripting:
on litres.com, searching for a term like "hello world", returns a series of query results; the URL of the page of these results is Search results for books: «hello world».
From this url you can get some useful info for the initial scripting fields:
- the url for a search is https://litres.com/search/, with an argument
?q= for a query string ("hello world")
- the word separator used in the query string is
+, so that is what should be used
- in Windows, you can get a preview of the raw data, by opening the search URL in a text editor. In plain Notepad (my personal preference) going to File > Open and (literally) pasting
https://litres.com/search/?q=hello+world in the file name box will open the html code for the search results' page. This code text is what you / your script will be working with.
Applying this to your previous script:
---------
[Name]=LitRes
[BasedOn]=litres.com
[IndexUrl]=https://litres.com/search/?q=%s
[AlbumUrl]=(for later)
[WordSeparator]=+
[Encoding]=url-utf-8
[UserAgent]=1
[IndexFormat]=%_preview%|%_url%|% ↓ Release Date%|% ↓ Title%|% ↓ Author%
[SearchBy]=Enter Album Name||hello world||%s
[Encoding]=url-utf-8
[UserAgent]=1
[ParserScriptIndex]=...
Debug "on" "test.txt"
--------
if you copy the above into a .src file and run it in Mp3Tag, you'll get a query input prefilled with "hello world"; by searching it, you'll get..... no results.
BUT, if you go to your Mp3Tag folder, you should find a 'test.txt' debug output file (for Windows only) with the following:
Use DebugWriteInput to inspect the original input data.
------------------------------------------------------------
Output : ><
Line and position:
<!DOCTYPE html><html lang="en-US"><script>if(typeof window.MutationObserver==='undefined'||typeof window.IntersectionObserver==='undefined'||typeof window.ResizeObserver==='undefined'||typeof window.globalThis==='undefined'||typeof window.Intl==='undefined'||typeof window.Intl.DateTimeFormat==='undefined'){document.write('<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?version=4.8.0&features=MutationObserver%2CIntersectionObserver%2CResizeObserver%2CglobalThis%2CIntl.DateTimeFormat.~locale.ru"></scr'+'ipt>')}
^
------------------------------------------------------------
Total output:
output["CurrentUrl"]= "https://litres.com/search/?q=hello+world"
output["Output"]= ""
output["Error"]= "<OK>"
If you compare the line with "<!DOCTYPE html>...." with the html code from Notepad, you'll find that it matches the first line of text.
Congratulations- You got a hit!
The reason Mp3Tag didn't find 'any results' is because [ParserScriptIndex] is (almost) empty, so there are no commands to process and return results, and nothing is returned -except the debug output file.
This is a bare minimum introduction to how a WS script works.
It is now up to you to use the various commands to collect the necessary information from the raw data and make it recognized by Mp3Tag.
Good luck. 