Updated: We fasten Torrents.ru to Vuze

    Not so long ago stumbled into LJ samiznayetekogo on the link to the Vuze program . Followed the link, looked and understood nothing. And today in the wonderful LiveJournal community ru_mac I saw a question: how to add the well-known “national torrent tracker Torrents.ru to the list of trackers that are being searched?” It was then that I really became interested in this program. I downloaded, installed, climbed the menu, and asked the same question: indeed, how would MiniNova and BTJunkie be, of course, interesting, but how can I search for Russian music and films in Russian?

    To add a site start a search. You will now find the option to edit and add sites to the search appears on the right. Adding a site can be a little tricky, requiring knowledge of regular expressions, but if somebody has already created a template you can import that instead.

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



    A Google search for an existing template doesn’t give anything (and it’s clear 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, in the Template name fieldenter the name of the template, leave the GET in the Search Method , and enter torrents.ru/forum/tracker.php?nm=%s in the URL to search field and check Requires Login - Vuze will open a window with the authorization form: Login (it’s better to log in according to the results of experiments in the upper form, without forgetting to tick the Remember checkbox there) and click Done. We glance over the silent list of detected cookies and drive in the Preview search term field , for example, also “Spleen”. Vuze thinks a little and displays more than 9000 characters of hard-to-read HTML: Without fear, we immediately enter the antidote in the Regular Expression field : Click Continue









    <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>

    . Vuze will offer 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 (in that form , as it is shown on Torrents.ru) Vuze will not be able to parse.

    Now about the pitfall. The fact is that Torrents.ru, as an ancient mammoth, still uses Windows-1251 as an encoding, as a result, most of the results when searching for Russian-speaking (and not only) names will be unreadable. I posted, there was a questionto the Vuze support forum, but it seems that the problem cannot be solved by the built-in tools, so I quickly wrote a script that serves as a bridge between Vuze and Torrents.ru, turning Windows 1251 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 authorization data inside the template, which is why there are no and will not be any ready-made templates for Torrents.ru on the Internet. Well, I thank you for your attention and take my leave.

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

    Also popular now: