Thread: EPGuru
View Single Post
Old 03-19-2005, 01:53 AM  
f0xn3t
Member
 
Join Date: Jul 2004
Posts: 55
Default

Quote:
Originally posted by MessyR
Title: Bad Request >> URL: http://epguides.com/<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td bgcolor=#3366cc><img width=1 height=1 alt=""></td></tr></table><table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#e5ecf9><tr><td bgcolor=#e5ecf9 nowrap><font size=+1>%epgurlnbsp;Web</font>%epgurlnbsp;</td><td bgcolor=#e5ecf9 align=right nowrap><font size=-1 color=>Results 1 - 10 of about 46 from epguides.


Worked fine yesterday anyone any ideas what this error can be?
it's a problem of google.com which put almost whole page code into one line, so it's damn hard to parse it... BUT as I've seen some other epguides.com scripts use the OLD search script on epguides.com which works again... so, in upcoming v4.1 EPGuru will use again epguides.com searching.. IT MEANS ALL PREVIOUS VERSIONS WORK AGAIN !! if you like them

but back to the problem... here is a temp fix:
find this text in the script:
Code:
		if {[catch {set token [::http::geturl http://www.google.com/search?hl=en&q=site%3Aepguides.com&q=$name -timeout 30000]}]} {
			putserv "$resperror :\[\002EPGuru\002\] ERR#40 - Connection problems with www.google.com! No data received."
			return "NONE"
		}

		set page ""

		if {[::http::ncode $token] == 404} {
			putserv "$resperror :\[\002EPGuru\002\] ERR#41 - Page was NOT FOUND at www.google.com!"
			::http::cleanup $token
			return "NONE"
		}

		foreach line [split [::http::data $token] "\n"] {
			if {[regexp {<br><font color=.*008000>epguides.com/.*/ {1}- {1}.*</font><nobr>.*} $line] } {
				regsub {<br><font color=.*008000>epguides.com/(.*)/ {1}- {1}.*</font><nobr>.*} $line {\1} page
				regsub -all "<b>" $page "" page
				regsub -all "</b>" $page "" page

				set page "$page/"
				break
			}
		}
and replace with this one:
Code:
		if {[catch {set token [::http::geturl http://epguides.master.com/texis/master/search/?q=$name -timeout 30000]}]} {
			putserv "$resperror :\[\002EPGuru\002\] ERR#40 - Connection problems with www.epguides.com! No data received."
			return "NONE"
		}

		set page ""

		if {[::http::ncode $token] == 404} {
			putserv "$resperror :\[\002EPGuru\002\] ERR#41 - Page was NOT FOUND at www.epguides.com!"
			::http::cleanup $token
			return "NONE"
		}

		foreach line [split [::http::data $token] "\n"] {
			if {[regexp "<b>URL:</b> <FONT SIZE=-1>" $line] } {
				regsub "<b>URL:</b> <FONT SIZE=-1>" $line " " page
				set page [string trim $page]
				regsub {http://epguides.com/(.*)} $page {\1} page
				if {[regexp {[[:alpha:]]/guide.shtml} $page]} {
					regsub {(.*)guide.shtml} $page {\1} page
				}
				break
			}
		}
f0xn3t is offline   Reply With Quote