📜 ⬆️ ⬇️

Updated: Screw Torrents.ru to Vuze

Not so long ago, I came across in a LiveJournal on a link to the Vuze program. Passed the link, looked and understood nothing. And today in a wonderful LJ community, ru_mac saw the question: how to add the well-known “national beattorrent tracker Torrents.ru” to the list of trackers being searched? It was here that I really became interested in this program. I downloaded, put, climbed the menu, and asked the same question: indeed, as if MiniNova and BTJunkie - this is certainly interesting, but how can you look for Russian music and movies in Russian?

To add a site start a search. It appears on the right. It is a little bit tricky.

And not a word about the pitfalls? OK let's see. Enter in the search bar, for example, "Splin", and get a bitter No Results. Click Add / Edit on the right, and see the following beauty:


')
Searching Google for an existing template does nothing (and you can understand why, but more on that later), so you have to do everything yourself. Click Create a custom template , select Regular Expression and poke Continue . In the next window, enter the name of the template in the Template name field, leave GET in the URL to search field, enter torrents.ru/forum/tracker.php?nm=%s in the URL to search field and mark Use Login - Vuze to open the window with the authorization form:



We log in (according to the results of experiments, it is better to log in in the top form, not forgetting to tick the Remember checkbox there) and click Done. We run through the eyes of nothing saying list of detected cookies and drive in the field of Preview search term , for example, also "Spleen". Vuze will think a little, and will output more than 9000 characters of hard-to-read HTML:



Without fear, we immediately introduce an antidote to the Regular Expression field:

<tr class="tCenter">\s*<td[^>]+>.*?</td>\s*<td[^>]+>.*?</td>\s*<td[^>]+><a[^>]+>(.*?)</a></td>\s*<td[^>]+>\s*<div>\s*<a.*?href="([^"]+)"><b>(.*?)</b></a>\s*</div>\s*</td>\s*<td[^>]+>.*?</td>\s*<td[^>]+>\s*<u>(\d+)</u>\s*<a.*?href="([^"]+)">(.*?)</a>\s*</td>\s*<td[^>]+><b>(\d+)</b></td>\s*<td[^>]+><b>(\d+)</b></td>\s*<td[^>]+>(\d+)</td>\s*<td[^>]+>\s*<u>(\d+)</u>\s*<p>([^<]+)</p>\s*<p>([^<]+)</p>\s*</td>\s*</tr>

Click Continue . Vuze will suggest to indicate where what, I chose as follows:
1 - Category
2 - Item details link
3 - Title
4 - File size
5 - Torrent file link
7 - Number of seeds
8 - Number of peers

Unfortunately, the date (as shown on Torrents.ru) Vuze will not be able to parse.

Now about the underwater rock. The fact is that Torrents.ru, as an ancient mammoth, still uses Windows-1251 as encoding, as a result most of the results when searching for Russian-speaking (and not only) titles will be unreadable. I posted a question in the Vuze support forum, but it seems that the problem cannot be solved with the built-in tools, so I quickly wrote a script that bridges Vuze and Torrents.ru, turning Windows-1251 of the latter into human UTF-8 . Download , upload to your server, and instead of the “native” URL to search, specify http: // “server address” /torrents_gateway.php?nm=%s.

Well, now the wonderful program has become even more wonderful and useful. By the way, it seems that Vuze stores the authorization data inside the template, which is why there are no ready-made templates for Torrents.ru on the Internet and will not be. Well, I thank you for your attention and bow away.

UPDATE : after my urgent requests, the developers made the necessary edits, and now Vuze understands Windows-1251 as native! Download the update and replace the file Azureus2.jar (in my case - Mac OS X - it is located in the folder /Applications/Vuze.app/Content/Resources/Java). By the way, there are some goodies in this update that are not in the official version - however, I haven’t been digging into them yet (in particular, the Devices tab is of genuine interest).

Source: https://habr.com/ru/post/55268/


All Articles