<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16231" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2015-04-24T09:42:44-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16231</id>

		<entry>
		<author><name><![CDATA[zoggy]]></name></author>
		<updated>2015-04-24T09:42:44-04:00</updated>

		<published>2015-04-24T09:42:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103932#p103932</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103932#p103932"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103932#p103932"><![CDATA[
update for the script to make it work again, have to pass cookie to show the old layout so it can be parsed:<br><br>in the geturl_followRedirects proc change this one line<br><br>from:<div class="codebox"><p>Code: </p><pre><code>        set token [eval [list http::geturl $url] $args]</code></pre></div>to:<div class="codebox"><p>Code: </p><pre><code>        set token [eval [list http::geturl $url -headers {Cookie listlayout_7=full}] $args]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12251">zoggy</a> — Fri Apr 24, 2015 9:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[fr3n]]></name></author>
		<updated>2013-06-28T12:35:57-04:00</updated>

		<published>2013-06-28T12:35:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101739#p101739</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101739#p101739"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101739#p101739"><![CDATA[
Works like a charm!<br><br>[18:27] &lt;@fren&gt; !bluray Django unchained<br>[18:27] &lt;pruts&gt; Django Unchained :: Starz / Anchor Bay | 2012 | 165 min | Rated R | Region A (locked) | Apr 16, 2013<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7058">fr3n</a> — Fri Jun 28, 2013 12:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[zoggy]]></name></author>
		<updated>2013-06-24T16:53:06-04:00</updated>

		<published>2013-06-24T16:53:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101728#p101728</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101728#p101728"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101728#p101728"><![CDATA[
So today I stumbled upon the bluray.tcl. I tried the modified 1.3.1 version but ran into some issues. Went back to the 1.2 and it also had issues (single results wouldnt work.. due to redirect). So to make this script have less need of staying up to date with blu-ray.com changes.. I modified so it spits out the movie info as the website shows it. Instead of trying to scrape each piece of data and figure out which var to put them in. (Since I don't mind seeing it in the x|x|x format anyways). <br><br>I've added a strip html function (remove html from info line) and urlencode (bluray keywords) as well as strip the 'Blu-ray' part from the parsed title. <br>The search currently is specify to search within the US, you can easily change this by finding "quicksearch_country=US" in the URL and changing the country to what you need (or use 'all' for all). <br><br>before:<blockquote class="uncited"><div>!bluray Batman Begins<br>&lt;bot&gt; "Batman Begins Blu-ray" Release date: N/A (Year: 2005 Length: N/A Rating: Rated PG-13 Studio: Region A &lt;font style="color: #999999"&gt;(B, C untested)&lt;/font&gt;)</div></blockquote>now:<blockquote class="uncited"><div>!bluray Batman Begins<br>&lt;bot&gt; Batman Begins :: Warner Bros. | 2005 | 140 min | Rated PG-13 | Region free | Jul 08, 2008 </div></blockquote><div class="codebox"><p>Code: </p><pre><code>####################################################################################### Blu-ray.com script made by dalys that search the website                           ## http://www.blu-ray.com for movie titles and fetch info                             ######################################################################################### Bugs/Suggestions/Whatever contact: dalys@chokladboll.se## &lt;user&gt; !bluray iron man 3# &lt;bot&gt; Iron Man 3 :: Disney / Buena Vista | 2013 | 140 min | Rated PG-13 | Region A (B, C untested) | Aug 27, 2013 ## Requirements: http.tcl, uri.tcl (tcllib)## Tested on eggdrop 1.6.18 &amp; 1.6.19##### CONFIG ##### Channels were script can be used (the only config line you HAVE to change)set bluray_availchans "#chan1 #chan2 #chan3"# Channels were the result will be sent in PMset bluray_quitechans "#chan2"# Output style## IRC markup: bold = \002, underline = \037, reverse(italic in some clients) =  \026# Example: %title is coming out \002%releasedate\002!## Normal search (!bluray &lt;title&gt;)set bluray_outputstyle "\002%title\002 :: %info"# Timeout, in ms (default: "20000")set bluray_timeout "10000"# What commands to respond to (default: !bluray !bd !br)bind pub - !bluray bluray_pubbind pub - !blu-ray bluray_pub#### END OF CONFIG ######## DO NOT EDIT BELOW, UNLESS YOU ACTUALLY KNOW WHAT YOU ARE DOING ####set bluray_version "1.3z"package require httppackage require uriproc strip_html_tags { htmlText } {    regsub -all {&lt;[^&gt;]+&gt;} $htmlText "" newText    return $newText}# http://rosettacode.org/wiki/URL_encoding#Tclproc urlencode {str} {    # Encode all except "unreserved" characters; use UTF-8 for extended chars.    # See http://tools.ietf.org/html/rfc3986 Â§2.4 and Â§2.5    set uStr [encoding convertto utf-8 $str]    set chRE {[^-A-Za-z0-9._~\n]};      # Newline is special case!    set replacement {%[format "%02X" [scan "\\\0" "%c"]]}    return [string map {"\n" "%0A"} [subst [regsub -all $chRE $uStr $replacement]]]}# http://wiki.tcl.tk/11831proc geturl_followRedirects {url args} {    array set URI [::uri::split $url] ;# Need host info from here    foreach x {1 2 3 4 5} {        set token [eval [list http::geturl $url] $args]        if {![string match {30[1237]} [::http::ncode $token]]} {return $token}        array set meta [set ${token}(meta)]        if {![info exist meta(Location)]} {            return $token        }        array set uri [::uri::split $meta(Location)]        unset meta        if {$uri(host) == ""} { set uri(host) $URI(host) }        # problem w/ relative versus absolute paths        set url [eval ::uri::join [array get uri]]    }}proc bluray_pub {nick uhost hand chan text} {    global bluray_availchans bluray_quitechans bluray_timeout bluray_outputstyle    set bluray_keywords $text    set bluray_output $bluray_outputstyle    if { ([lsearch -exact $bluray_availchans $chan] == -1) &amp;&amp; ($chan != "privmsg") } { return }    if { ([lsearch -exact $bluray_quitechans $chan] != -1) || ($chan == "privmsg") } { set chan $nick }    if { [string match $text ""] } {        puthelp "PRIVMSG $chan :Usage: !bluray &lt;movie title&gt;"        return    } else {        set bluray_keywords [lrange $text 0 end]    }    # currently the webpage defaults to the geo-dns country, should force this to ALL?    # http://www.blu-ray.com/setcountry.php?country=all    set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;quicksearch_country=US&amp;section=bluraymovies&amp;sortby=popularity&amp;submit=Search&amp;action=search&amp;quicksearch_keyword="    append bluray_url [urlencode [string trimleft $bluray_keywords]]    puts $bluray_url    # this wont work when its a single result, since the website redirects to its page..     #catch {set page [::http::geturl $bluray_url -timeout $bluray_timeout]} error    # thus this redirect routine is needed, which requires tcllib package to be installed    catch {set page [geturl_followRedirects $bluray_url -timeout $bluray_timeout]} error    if { [string match -nocase "*couldn't open socket*" $error] } {        puthelp "PRIVMSG $chan :Error: Could not open socket to blu-ray.com, please try again later."        ::http::cleanup $page        return    }    if { [::http::status $page] == "timeout" } {        puthelp "PRIVMSG $chan :Error: Timed out connecting to blu-ray.com, please try again later."        ::http::cleanup $page        return    }    set html [::http::data $page]    ::http::cleanup $page    # flatten html source so that its easier to match more specific lines of code via regexp    set html [string map { "\r\n" "" "\n" "" "\\n" "" } $html]    if { [regexp {class="noline"&gt;&lt;h3&gt;(.*?)&lt;/h3&gt;&lt;/a&gt;} $html match bluray_title] } {        set bluray_title [string map {" Blu-ray" ""} $bluray_title]        if { [regexp {&lt;br&gt;&lt;small style=\"color: #666666\"&gt;(.*?)&lt;/small&gt;&lt;br&gt;} $html match bluray_info] } {            set bluray_info [strip_html_tags $bluray_info]            regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output            regsub -all -nocase "%info" $bluray_output $bluray_info bluray_output            puthelp "PRIVMSG $chan :$bluray_output"        } else {            puthelp "PRIVMSG $chan :Could not retrieve info about $bluray_title"        }    } elseif { [regexp {&lt;h1 itemprop="itemReviewed"&gt;&lt;a.*?&gt;(.*?)&lt;/a&gt;} $html match bluray_title] } {        if {[regexp {&lt;span class="subheading" style="color: #666666"&gt;(.*?)&lt;/span&gt;&lt;br&gt;&lt;br&gt;} $html matched bluray_info]} {            set bluray_info [strip_html_tags $bluray_info]            regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output            regsub -all -nocase "%info" $bluray_output $bluray_info bluray_output            puthelp "PRIVMSG $chan :$bluray_output"        } else {            puthelp "PRIVMSG $chan :Could not retrieve info about $bluray_title"        }    } else {        if {[regexp {&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;(.{100,250}?)&lt;br&gt;&lt;br&gt;&lt;h5&gt;} $html match bluray_noresult] } {            set bluray_noresult [string map {"&lt;b&gt;" "\002" "&lt;/b&gt;" "\002"} $bluray_noresult]            puthelp "PRIVMSG $chan :$bluray_noresult"        } else {            puthelp "PRIVMSG $chan :Could not fetch any search result, try searching for a more specific title name."        }    }}putlog "Blu-ray.com script $bluray_version by dalys / zoggy LOADED"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12251">zoggy</a> — Mon Jun 24, 2013 4:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2011-09-20T12:48:51-04:00</updated>

		<published>2011-09-20T12:48:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97746#p97746</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97746#p97746"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97746#p97746"><![CDATA[
hey, can you make it works with 1.8 and without additional .tcls or packages.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Tue Sep 20, 2011 12:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Znuff]]></name></author>
		<updated>2011-08-23T03:22:22-04:00</updated>

		<published>2011-08-23T03:22:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97483#p97483</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97483#p97483"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97483#p97483"><![CDATA[
I've updated this again:<br><br>Fixed some issues with some movies not showing a release date.<br><strong class="text-strong">uri.tcl</strong> can be found in the tcllib package. Most linux distributions should have that.<br><div class="codebox"><p>Code: </p><pre><code>####################################################################################### Blu-ray.com script made by dalys that search the website                           ## http://www.blu-ray.com for movie titles and fetch info                             ######################################################################################### Bugs/Suggestions/Whatever contact: dalys@chokladboll.se## &lt;dalys&gt; !bluray the dark knight# &lt;bot&gt; "The Dark Knight (Blu-ray)" Release date: Dec 09, 2008 (Year: 2008  Length: 152 mins Rating: Rated PG-13 Studio: Warner Bros.)## Requirements: http.tcl, uri.tcl## Tested on eggdrop 1.6.18 &amp; 1.6.19 &amp; 1.6.20## 1.3.1-coconut 2011-08-23 / znuffy@gmail.com# - Fixed the release date for some movies (some movies with release date on the website#   didn't show up in the script## 1.3coconut 2010-09-23 / znuffy@gmail.com# - Removed the -details option, too much work to maintain it between the layout changes#   of blu-ray.com# - Fixed and added new stuff for the layout/code changes of blu-ray.com.# - Lowered default timeout value to 10seconds## 1.2 2010-02-01# - Blu-ray.com has been updated (with a better search function it seems)#   and so has the script.# - Moved the project to github.## 1.1 2008-10-26# - Fixed a broken regexp due to changes in blu-ray.com's html code# - Replaced the replacevar function with regsub (replacevar was not part of standard TCL)#   Thanks to speechles for taking his time and helping out with the above!## 1.0 2008-10-05# First release.### Known issues:# - Found one title with the release date set to "2009", which the script will mistake# for the year the movie was made which is also just four digits.##### CONFIG ##### Channels were script can be used (the only config line you HAVE to change)set bluray_availchans "#rsr"# Channels were the result will be sent in PMset bluray_quitechans "#chan2 #chan4"# Output style## IRC markup: bold = \002, underline = \037, reverse(italic in some clients) =  \026# Example: %title is coming out \002%releasedate\002!## Normal search (!bluray &lt;title&gt;)# Variables available: %title %studio %year %releasedate %rating %length# Default: "\"%title\" Release date: \002%releasedate\002 \(Year: %year Length: %length Rating: %rating Studio: %studio\)"set bluray_outputstyle "\"%title\" Release date: \002%releasedate\002 \(Year: %year Length: %length Rating: %rating\)"# Timeout, in ms (default: "20000")set bluray_timeout "10000"# What commands to respond to (default: !bluray !bd !br)bind pub - .bd bluray_pubbind pub - .br bluray_pub#### END OF CONFIG ######## DO NOT EDIT BELOW, UNLESS YOU ACTUALLY KNOW WHAT YOU ARE DOING ####set bluray_version "1.3.1-coconut"package require httppackage require uriproc geturl_followRedirects {url args} {    array set URI [::uri::split $url] ;# Need host info from here    foreach x {1 2 3 4 5} {        set token [eval [list http::geturl $url] $args]        if {![string match {30[1237]} [::http::ncode $token]]} {return $token}        array set meta [set ${token}(meta)]        if {![info exist meta(Location)]} {            return $token        }        array set uri [::uri::split $meta(Location)]        unset meta        if {$uri(host) == ""} { set uri(host) $URI(host) }        # problem w/ relative versus absolute paths        set url [eval ::uri::join [array get uri]]    }}proc bluray_pub {nick uhost hand chan text} {    global bluray_availchans bluray_quitechans bluray_timeout bluray_outputstyle        set bluray_keywords $text    set bluray_output $bluray_outputstyle        if {([lsearch -exact $bluray_availchans $chan] == -1) &amp;&amp; ($chan != "privmsg")} {return}    if {([lsearch -exact $bluray_quitechans $chan] != -1) || ($chan == "privmsg")} {set chan $nick}        if {[string match $text ""]} {        puthelp "PRIVMSG $chan :Usage: !bluray &lt;movie title&gt;"        return    } else { set bluray_keywords [lrange $text 0 end] }            set bluray_keywords [string map { " " "+" "%" "+" "&amp;" "+" "*" "+" "." "+"} $bluray_keywords]        #set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;section=movies&amp;keyword=$bluray_keywords&amp;sortby=popularity"    set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;section=movies&amp;quicksearch_keyword=$bluray_keywords&amp;searchbutton.x=0&amp;searchbutton.y=0"    catch {set page [geturl_followRedirects $bluray_url -timeout $bluray_timeout]} error    if {[string match -nocase "*couldn't open socket*" $error]} {        puthelp "PRIVMSG $chan :Error: Could not open socket to blu-ray.com, please try again later."        ::http::cleanup $page        return    }    if {[::http::status $page] == "timeout" } {        puthelp "PRIVMSG $chan :Error: Timed out connecting to blu-ray.com, please try again later."        ::http::cleanup $page        return    }        set html [::http::data $page]    ::http::cleanup $page        set html [string map { "\r\n" "" "\n" "" "\\n" "" } $html]        if {[regexp {&lt;h3&gt;(.*?)&lt;/h3&gt;&lt;/a&gt;} $html match bluray_title] } {                if {[regexp {&lt;small style=\"color: #666666\"&gt;(.*?)&lt;/small&gt;} $html match bluray_info] } {            set bluray_infosplit [split $bluray_info "|"]                        set bluray_info_year "N/A"            set bluray_info_studio "N/A"            set bluray_info_releasedate "N/A"            set bluray_info_rating "N/A"            set bluray_info_length "N/A"            for { set i 0 } { $i &lt; 6 } { incr i } {                                set bluray_currentinfo [string trimleft [lindex $bluray_infosplit $i]]                set bluray_currentinfo [string trimright $bluray_currentinfo]                                if {[regexp {^[0-9]{1,4}$} $bluray_currentinfo]} {                    set bluray_info_year $bluray_currentinfo                                    }                if {[regexp {^[0-9]{1,5}\smin$} $bluray_currentinfo]} {                    set bluray_info_length $bluray_currentinfo                }                if {[regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo]} {                    set bluray_info_releasedate $bluray_currentinfo                }                if {[regexp {^.*(R|r)ated.*$} $bluray_currentinfo]} {                    set bluray_info_rating $bluray_currentinfo                }                if {![regexp {^[0-9]{4}$} $bluray_currentinfo] &amp;&amp; ![regexp {^[0-9]*\smin$} $bluray_currentinfo] &amp;&amp; ![regexp {^[A-z]{3}\s[0-9]{1,2},\s[0-9]{4}} $bluray_currentinfo] &amp;&amp; ![regexp {^.*(R|r)ated.*$} $bluray_currentinfo] &amp;&amp; ![regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo] &amp;&amp; [regexp {[A-z0-9]{2,60}} $bluray_currentinfo]} {                    set bluray_info_studio $bluray_currentinfo                }                            }                        regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output            regsub -all -nocase "%studio" $bluray_output $bluray_info_studio bluray_output            regsub -all -nocase "%year" $bluray_output $bluray_info_year bluray_output            regsub -all -nocase "%length" $bluray_output $bluray_info_length bluray_output            regsub -all -nocase "%rating" $bluray_output $bluray_info_rating bluray_output            regsub -all -nocase "%releasedate" $bluray_output $bluray_info_releasedate bluray_output                        puthelp "PRIVMSG $chan :$bluray_output"                    } else {            puthelp "PRIVMSG $chan :Could not retrieve coconut about $bluray_title"        }    } elseif {[regexp {&lt;h2 class="title"&gt;(.*?)&lt;/h2&gt;} $html match bluray_title]} {        if {[regexp {&lt;span class="subheading" style="color: #666666"&gt;(.*?)&lt;/span&gt;&lt;br&gt;&lt;br&gt;} $html matched bluray_info]} {                        regsub -all {&lt;[^&gt;]+&gt;} $bluray_info { } bluray_info_stripped                        set bluray_infosplit [split $bluray_info_stripped "|"]                        set bluray_info_year "N/A"            set bluray_info_studio "N/A"            set bluray_info_releasedate "N/A"            set bluray_info_rating "N/A"            set bluray_info_length "N/A"                        for { set i 0 } { $i &lt; 5 } { incr i } {                                set bluray_currentinfo [string trimleft [lindex $bluray_infosplit $i]]                set bluray_currentinfo [string trimright $bluray_currentinfo]                                if {[regexp {^[0-9]{1,4}$} $bluray_currentinfo]} {                    set bluray_info_year $bluray_currentinfo                }                if {[regexp {^[0-9]{1,5}\smin$} $bluray_currentinfo]} {                    set bluray_info_length $bluray_currentinfo                }                if {[regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo]} {                    set bluray_info_releasedate $bluray_currentinfo                }                if {[regexp {^.*(R|r)ated.*$} $bluray_currentinfo]} {                    set bluray_info_rating $bluray_currentinfo                }                if {![regexp {^[0-9]{4}$} $bluray_currentinfo] &amp;&amp; ![regexp {^[0-9]*\smin$} $bluray_currentinfo] &amp;&amp; ![regexp {^[A-z]{3}\s[0-9]{1,2},\s[0-9]{4}} $bluray_currentinfo] &amp;&amp; ![regexp {^.*(R|r)ated.*$} $bluray_currentinfo] &amp;&amp; !  [regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo] &amp;&amp; [regexp {[A-z0-9]{2,60}} $bluray_currentinfo]} {                    set bluray_info_studio $bluray_currentinfo                }                            }                        regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output            regsub -all -nocase "%studio" $bluray_output $bluray_info_studio bluray_output            regsub -all -nocase "%year" $bluray_output $bluray_info_year bluray_output            regsub -all -nocase "%length" $bluray_output $bluray_info_length bluray_output            regsub -all -nocase "%rating" $bluray_output $bluray_info_rating bluray_output            regsub -all -nocase "%releasedate" $bluray_output $bluray_info_releasedate bluray_output                                    puthelp "PRIVMSG $chan :$bluray_output"                    } else {            puthelp "PRIVMSG $chan :The coconut is broken."        }    } else {                if {[regexp {alt=\"United\sKingdom\"\stitle=\"United\sKingdom\"\s\/&gt;&lt;br&gt;&lt;br&gt;(.{100,250}?)&lt;br&gt;&lt;br&gt;&lt;h5&gt;} $html match bluray_noresult] } {            set bluray_noresult [string map {"&lt;b&gt;" "\002" "&lt;/b&gt;" "\002"} $bluray_noresult]            regsub -all "results" $bluray_noresult "coconuts" bluray_coconuts            puthelp "PRIVMSG $chan :$bluray_coconuts"        } else {            puthelp "PRIVMSG $chan :Could not fetch any search result or error message. The coconut is probably outdated."        }            }        }putlog "blu-ray.com script $bluray_version: LOADED"</code></pre></div><a href="http://z.linge-ma.ws/eggdrop/bluray.tcl" class="postlink">http://z.linge-ma.ws/eggdrop/bluray.tcl</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11219">Znuff</a> — Tue Aug 23, 2011 3:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stu1818]]></name></author>
		<updated>2010-10-24T06:26:40-04:00</updated>

		<published>2010-10-24T06:26:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94837#p94837</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94837#p94837"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94837#p94837"><![CDATA[
could anybody tell me where i get uri.tcl from, this script looks good, i just cannot run it as i do not have uri.tcl <br><br>thanks<br><br>stu  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11401">stu1818</a> — Sun Oct 24, 2010 6:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ragman]]></name></author>
		<updated>2010-10-14T12:53:02-04:00</updated>

		<published>2010-10-14T12:53:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94724#p94724</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94724#p94724"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94724#p94724"><![CDATA[
Any progress with the official version dalys?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11239">Ragman</a> — Thu Oct 14, 2010 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Znuff]]></name></author>
		<updated>2010-09-23T15:13:16-04:00</updated>

		<published>2010-09-23T15:13:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94492#p94492</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94492#p94492"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94492#p94492"><![CDATA[
Couldn't wait for an update from dalys so I updated it to suit my needs. I removed the -details switch because there was way too much work to adapt it for the changes on blu-ray.com.<br><div class="codebox"><p>Code: </p><pre><code>####################################################################################### Blu-ray.com script made by dalys that search the website                           ## http://www.blu-ray.com for movie titles and fetch info                             ######################################################################################### Bugs/Suggestions/Whatever contact: dalys@chokladboll.se## &lt;dalys&gt; !bluray the dark knight# &lt;bot&gt; "The Dark Knight (Blu-ray)" Release date: Dec 09, 2008 (Year: 2008  Length: 152 mins Rating: Rated PG-13 Studio: Warner Bros.)## Requirements: http.tcl, uri.tcl## Tested on eggdrop 1.6.18 &amp; 1.6.19 &amp; 1.6.20## 1.3coconut 2010-09-23 / znuffy@gmail.com# - Removed the -details option, too much work to maintain it between the layout changes#   of blu-ray.com# - Fixed and added new stuff for the layout/code changes of blu-ray.com.# - Lowered default timeout value to 10seconds## 1.2 2010-02-01# - Blu-ray.com has been updated (with a better search function it seems)#   and so has the script.# - Moved the project to github.## 1.1 2008-10-26# - Fixed a broken regexp due to changes in blu-ray.com's html code# - Replaced the replacevar function with regsub (replacevar was not part of standard TCL)#   Thanks to speechles for taking his time and helping out with the above!## 1.0 2008-10-05# First release.### Known issues:# - Found one title with the release date set to "2009", which the script will mistake# for the year the movie was made which is also just four digits.##### CONFIG ##### Channels were script can be used (the only config line you HAVE to change)set bluray_availchans "#test1"# Channels were the result will be sent in PMset bluray_quitechans "#chan2 #chan4"# Output style## IRC markup: bold = \002, underline = \037, reverse(italic in some clients) =  \026# Example: %title is coming out \002%releasedate\002!## Normal search (!bluray &lt;title&gt;)# Variables available: %title %studio %year %releasedate %rating %length# Default: "\"%title\" Release date: \002%releasedate\002 \(Year: %year Length: %length Rating: %rating Studio: %studio\)"set bluray_outputstyle "\"%title\" Release date: \002%releasedate\002 \(Year: %year Length: %length Rating: %rating Studio: %studio\)"# Timeout, in ms (default: "20000")set bluray_timeout "10000"# What commands to respond to (default: !bluray !bd !br)bind pub - !bluray bluray_pubbind pub - !blu-ray bluray_pubbind pub - !bd bluray_pubbind pub - !br bluray_pub#### END OF CONFIG ######## DO NOT EDIT BELOW, UNLESS YOU ACTUALLY KNOW WHAT YOU ARE DOING ####set bluray_version "1.3coconut"package require httppackage require uriproc geturl_followRedirects {url args} {    array set URI [::uri::split $url] ;# Need host info from here    foreach x {1 2 3 4 5} {        set token [eval [list http::geturl $url] $args]        if {![string match {30[1237]} [::http::ncode $token]]} {return $token}        array set meta [set ${token}(meta)]        if {![info exist meta(Location)]} {            return $token        }        array set uri [::uri::split $meta(Location)]        unset meta        if {$uri(host) == ""} { set uri(host) $URI(host) }        # problem w/ relative versus absolute paths        set url [eval ::uri::join [array get uri]]    }}proc bluray_pub {nick uhost hand chan text} {    global bluray_availchans bluray_quitechans bluray_timeout bluray_outputstyle        set bluray_keywords $text    set bluray_output $bluray_outputstyle        if {([lsearch -exact $bluray_availchans $chan] == -1) &amp;&amp; ($chan != "privmsg")} {return}    if {([lsearch -exact $bluray_quitechans $chan] != -1) || ($chan == "privmsg")} {set chan $nick}        if {[string match $text ""]} {        puthelp "PRIVMSG $chan :Usage: !bluray &lt;movie title&gt;"        return    } else { set bluray_keywords [lrange $text 0 end] }            set bluray_keywords [string map { " " "+" "%" "+" "&amp;" "+" "*" "+" "." "+"} $bluray_keywords]        #set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;section=movies&amp;keyword=$bluray_keywords&amp;sortby=popularity"    set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;section=movies&amp;quicksearch_keyword=$bluray_keywords&amp;searchbutton.x=0&amp;searchbutton.y=0"    catch {set page [geturl_followRedirects $bluray_url -timeout $bluray_timeout]} error    if {[string match -nocase "*couldn't open socket*" $error]} {        puthelp "PRIVMSG $chan :Error: Could not open socket to blu-ray.com, please try again later."        ::http::cleanup $page        return    }    if {[::http::status $page] == "timeout" } {        puthelp "PRIVMSG $chan :Error: Timed out connecting to blu-ray.com, please try again later."        ::http::cleanup $page        return    }        set html [::http::data $page]    ::http::cleanup $page        set html [string map { "\r\n" "" "\n" "" "\\n" "" } $html]        if {[regexp {&lt;h3&gt;(.*?)&lt;/h3&gt;&lt;/a&gt;} $html match bluray_title] } {                if {[regexp {&lt;br&gt;&lt;small style=\"color: #666666\"&gt;(.*?)&lt;/small&gt;&lt;br&gt;} $html match bluray_info] } {                        set bluray_infosplit [split $bluray_info "|"]                                    set bluray_info_year "N/A"            set bluray_info_studio "N/A"            set bluray_info_releasedate "N/A"            set bluray_info_rating "N/A"            set bluray_info_length "N/A"            for { set i 0 } { $i &lt; 5 } { incr i } {                                set bluray_currentinfo [string trimleft [lindex $bluray_infosplit $i]]                set bluray_currentinfo [string trimright $bluray_currentinfo]                                if {[regexp {^[0-9]{1,4}$} $bluray_currentinfo]} {                    set bluray_info_year $bluray_currentinfo                                    }                if {[regexp {^[0-9]{1,5}\smin$} $bluray_currentinfo]} {                    set bluray_info_length $bluray_currentinfo                }                if {[regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo]} {                    set bluray_info_releasedate $bluray_currentinfo                }                if {[regexp {^.*(R|r)ated.*$} $bluray_currentinfo]} {                    set bluray_info_rating $bluray_currentinfo                }                if {![regexp {^[0-9]{4}$} $bluray_currentinfo] &amp;&amp; ![regexp {^[0-9]*\smin$} $bluray_currentinfo] &amp;&amp; ![regexp {^[A-z]{3}\s[0-9]{1,2},\s[0-9]{4}} $bluray_currentinfo] &amp;&amp; ![regexp {^.*(R|r)ated.*$} $bluray_currentinfo] &amp;&amp; ![regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo] &amp;&amp; [regexp {[A-z0-9]{2,60}} $bluray_currentinfo]} {                    set bluray_info_studio $bluray_currentinfo                }                            }                        regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output            regsub -all -nocase "%studio" $bluray_output $bluray_info_studio bluray_output            regsub -all -nocase "%year" $bluray_output $bluray_info_year bluray_output            regsub -all -nocase "%length" $bluray_output $bluray_info_length bluray_output            regsub -all -nocase "%rating" $bluray_output $bluray_info_rating bluray_output            regsub -all -nocase "%releasedate" $bluray_output $bluray_info_releasedate bluray_output                        puthelp "PRIVMSG $chan :$bluray_output"                    } else {            puthelp "PRIVMSG $chan :Could not retrieve coconut about $bluray_title"        }    } elseif {[regexp {&lt;h2 class="title"&gt;(.*?)&lt;/h2&gt;} $html match bluray_title]} {        if {[regexp {&lt;span class="subheading" style="color: #666666"&gt;(.*?)&lt;/span&gt;&lt;br&gt;&lt;br&gt;} $html matched bluray_info]} {                        regsub -all {&lt;[^&gt;]+&gt;} $bluray_info { } bluray_info_stripped                        set bluray_infosplit [split $bluray_info_stripped "|"]                        set bluray_info_year "N/A"            set bluray_info_studio "N/A"            set bluray_info_releasedate "N/A"            set bluray_info_rating "N/A"            set bluray_info_length "N/A"                        for { set i 0 } { $i &lt; 5 } { incr i } {                                set bluray_currentinfo [string trimleft [lindex $bluray_infosplit $i]]                set bluray_currentinfo [string trimright $bluray_currentinfo]                                if {[regexp {^[0-9]{1,4}$} $bluray_currentinfo]} {                    set bluray_info_year $bluray_currentinfo                }                if {[regexp {^[0-9]{1,5}\smin$} $bluray_currentinfo]} {                    set bluray_info_length $bluray_currentinfo                }                if {[regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo]} {                    set bluray_info_releasedate $bluray_currentinfo                }                if {[regexp {^.*(R|r)ated.*$} $bluray_currentinfo]} {                    set bluray_info_rating $bluray_currentinfo                }                if {![regexp {^[0-9]{4}$} $bluray_currentinfo] &amp;&amp; ![regexp {^[0-9]*\smin$} $bluray_currentinfo] &amp;&amp; ![regexp {^[A-z]{3}\s[0-9]{1,2},\s[0-9]{4}} $bluray_currentinfo] &amp;&amp; ![regexp {^.*(R|r)ated.*$} $bluray_currentinfo] &amp;&amp; !  [regexp {((Q[0-9]\s|[A-z]{3}\s[0-9]{2},\s)[0-9]{4}|No\sRelease\sDate)} $bluray_currentinfo] &amp;&amp; [regexp {[A-z0-9]{2,60}} $bluray_currentinfo]} {                    set bluray_info_studio $bluray_currentinfo                }                            }                        regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output            regsub -all -nocase "%studio" $bluray_output $bluray_info_studio bluray_output            regsub -all -nocase "%year" $bluray_output $bluray_info_year bluray_output            regsub -all -nocase "%length" $bluray_output $bluray_info_length bluray_output            regsub -all -nocase "%rating" $bluray_output $bluray_info_rating bluray_output            regsub -all -nocase "%releasedate" $bluray_output $bluray_info_releasedate bluray_output                                    puthelp "PRIVMSG $chan :$bluray_output"                    } else {            puthelp "PRIVMSG $chan :The coconut is broken."        }    } else {                if {[regexp {alt=\"United\sKingdom\"\stitle=\"United\sKingdom\"\s\/&gt;&lt;br&gt;&lt;br&gt;(.{100,250}?)&lt;br&gt;&lt;br&gt;&lt;h5&gt;} $html match bluray_noresult] } {            set bluray_noresult [string map {"&lt;b&gt;" "\002" "&lt;/b&gt;" "\002"} $bluray_noresult]            regsub -all "results" $bluray_noresult "coconuts" bluray_coconuts            puthelp "PRIVMSG $chan :$bluray_coconuts"        } else {            puthelp "PRIVMSG $chan :Could not fetch any search result or error message. The coconut is probably outdated."        }            }        }putlog "Blu-ray.com script $bluray_version by dalys LOADED"</code></pre></div>edit: forgot to edit 2 lines.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11219">Znuff</a> — Thu Sep 23, 2010 3:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Znuff]]></name></author>
		<updated>2010-09-07T11:01:56-04:00</updated>

		<published>2010-09-07T11:01:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94241#p94241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94241#p94241"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94241#p94241"><![CDATA[
impatiently waiting<br><br>(would be nice to see the .diff)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11219">Znuff</a> — Tue Sep 07, 2010 11:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ragman]]></name></author>
		<updated>2010-09-03T11:47:40-04:00</updated>

		<published>2010-09-03T11:47:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94209#p94209</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94209#p94209"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94209#p94209"><![CDATA[
Hooray!<br>Tack i förväg <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11239">Ragman</a> — Fri Sep 03, 2010 11:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dalys]]></name></author>
		<updated>2010-09-03T11:46:58-04:00</updated>

		<published>2010-09-03T11:46:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94208#p94208</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94208#p94208"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94208#p94208"><![CDATA[
<blockquote class="uncited"><div>Anyone manage to fix the script again?</div></blockquote>Hey-o! I'm actually working on it right now. Expect a new version today or at least this weekend. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10251">dalys</a> — Fri Sep 03, 2010 11:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ragman]]></name></author>
		<updated>2010-09-03T11:44:47-04:00</updated>

		<published>2010-09-03T11:44:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94207#p94207</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94207#p94207"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94207#p94207"><![CDATA[
Anyone manage to fix the script again?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11239">Ragman</a> — Fri Sep 03, 2010 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cbsjanten1]]></name></author>
		<updated>2010-07-04T07:43:40-04:00</updated>

		<published>2010-07-04T07:43:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93439#p93439</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93439#p93439"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93439#p93439"><![CDATA[
seems the changed something on blu-ray.com again  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11255">cbsjanten1</a> — Sun Jul 04, 2010 7:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ragman]]></name></author>
		<updated>2010-06-18T13:44:56-04:00</updated>

		<published>2010-06-18T13:44:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93347#p93347</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93347#p93347"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93347#p93347"><![CDATA[
<blockquote class="uncited"><div>hey im still running version 1.1<br>just replace ur url line with<div class="codebox"><p>Code: </p><pre><code>set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;section=movies&amp;quicksearch_keyword=$bluray_keywords&amp;searchbutton.x=0&amp;searchbutton.y=0"</code></pre></div>works really fine...great script</div></blockquote>I updated v1.2 with the above line and now it works like a charm.<br>THANKS A LOT! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11239">Ragman</a> — Fri Jun 18, 2010 1:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cbsjanten1]]></name></author>
		<updated>2010-06-18T11:05:45-04:00</updated>

		<published>2010-06-18T11:05:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93344#p93344</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93344#p93344"/>
		<title type="html"><![CDATA[blu-ray.com script by dalys (current: blu-ray.com_1.2.tcl)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93344#p93344"><![CDATA[
hey im still running version 1.1<br>just replace ur url line with<div class="codebox"><p>Code: </p><pre><code>set bluray_url "http://www.blu-ray.com/search/?quicksearch=1&amp;section=movies&amp;quicksearch_keyword=$bluray_keywords&amp;searchbutton.x=0&amp;searchbutton.y=0"</code></pre></div>works really fine...great script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11255">cbsjanten1</a> — Fri Jun 18, 2010 11:05 am</p><hr />
]]></content>
	</entry>
	</feed>
