Class: Dic

Inherits:
Object
  • Object
show all
Defined in:
lib/dic.rb

Instance Method Summary collapse

Instance Method Details

#geted2kinfo(url) ⇒ Object

ed2k


757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/dic.rb', line 757

def geted2kinfo(url)
   p url
	url.match(/^:\/\/\|(.+?)\|(\S+?)\|(.+?)\|.*$/)
	name=$2.to_s;size=$3.to_f
	return if $1 == 'server'
	return if not $3
	if url =~ /%..%../ #解析%DA之类的
		$ti = "#{URLDecode(name)} , #{'%.2f' % (size / 1024**3)} GB"
	else
		$ti = " #{ '%.2f' % (size / 1024**3)} GB"
	end
	$ti.gsub!(/.*\]\./,'')
	"#{$ti.unescapeHTML}"
end