Quiz Memorial Forum

Welcome Guest ( Log In | Register )

> poisk.tcl v3.6.5, Search engines parser
Kreon
post Jul 8 2006, 12:06 PM
Post #1


Developer
******

Group: Root Admin
Posts: 396
Joined: --
From: Внешние пределы
Member No.: 2



3.6.5
Апдейты

3.6.4
Дополнены !google/!yandex/!rambler
Дополнен поиск !file
Поправлена информация по !image
Исправлены !linux/!bsd/!mac
Удалены !xdcc/!crack ввиду неработоспособности сайтов поисковиков

3.6.3
Исправлен !google, !images (от OxCom)
Добавлена поддержка Suzi, где её не хватало smile.gif

3.6.2a
Исправлена работа !yandex (от OxCom)
Исправлен перевод кодировок с использованием патча Suzi для !rambler.
Изменен под UTF8 !google, исправлен !msn

3.6.2
Обновленная версия поисковика. Исправлен яндекс, теперь скрипт должен корректно работать с пропатчеными ботами.

3.6.4 3.6.5 Attached File  poisk.tcl ( 21.15k ) Number of downloads: 1547
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
2 Pages V < 1 2  
Reply to this topicStart new topic
Replies(20 - 23)
Kreon
post Sep 1 2008, 02:56 PM
Post #21


Developer
******

Group: Root Admin
Posts: 396
Joined: --
From: Внешние пределы
Member No.: 2



Всё нормально на патченных ботах с encoding system = cp1251.
По поводу других информации нет. Если кто исправит скрипт для совместимости с другими вариантами настройки бота не сломав работу на патченных - присылайте, выложу.


--------------------
Не понял сам - не дай понять другому
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Alvor
post Sep 2 2008, 04:32 PM
Post #22


Участник
***

Group: Members
Posts: 30
Joined: 9-March 07
Member No.: 76



Информация - на патченом работает, на непатченом яндекс кракозявит.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Xam
post Sep 13 2008, 01:18 PM
Post #23


Посетитель
*

Group: Members
Posts: 1
Joined: 13-September 08
Member No.: 248



На непатченном с
encoding system iso8859-1
set egg_codepage cp1251

CODE
proc ::poisk::yandex_on_data {id html nick chan uhost com} {
    global poisk
    if {![info exists sp_version]} {
        set html [encoding convertto cp1251 [encoding convertfrom utf-8 $html]]
    } else {
        set html [encoding convertfrom utf-8 $html]
    }
    regsub -all -- \n $html {} html; regsub -all -nocase -- </a> $html </a>\n html
    set qnum $poisk(host,$uhost); set num 0
    catch { unset poisk(host,$uhost) }
    if { $poisk(debug) } { putlog "\[poisk\] callback executed... analyzing data..." }
    set res "";    set total ""; set desc ""
    foreach line [split $html \n] {
       regexp -nocase -- {Нашлось<br>(.*?)страниц} $line garb total
        if { [regexp -nocase -- {<a tabindex.*?onclick.*?href=\"(.*?)\".*?target=.*?><b>(.*?)</b>.*?</a>} $line garb res desc] ||
             [regexp -nocase -- {<a tabindex=.*?onclick=.*?href=\"(.*?)\".*?target=.*?>(.*?)</a>} $line garb res desc] } { incr num; if { $num != $qnum } { set res ""; set desc "" } else { break } }
        }
    if { $poisk(debug) } { putlog "\[poisk\] res=$res desc=$desc total=$total" }
    if { $res == "" } { ::egglib::out $nick $chan $poisk(txt,fail_$com); return }
    set desc [string trim [::egglib::unhtml $desc]]
    set total [string trim [::egglib::unhtml [string map {  { }} $total]]]
    if { $total != "" } { set total " ($poisk(txt,total) $total)" }
    if { $desc != "" } { set desc " - \0035$desc\003" }
    ::egglib::out $nick $chan "\00312$res\003$desc$total"
}

Яндекс так работает в нормальной кодировке, поидее и на сузи так должно работать тоже. Рамблер и гугл работают без каких-либо правок.


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Alvor
post Oct 9 2010, 10:20 AM
Post #24


Участник
***

Group: Members
Posts: 30
Joined: 9-March 07
Member No.: 76



Оно опять не работает. Пачините? ))
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

2 Pages V < 1 2
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 13th May 2024 - 04:09 AM
Design by GPF © 2006