This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

URL Title grabber

Support & discussion of released scripts, and announcements of new releases.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

I'd change the returns to just 'return' and not 'return ""'

Not much I can to do debug if I can't duplicate the problem. Put some "putcmdlog" lines in the procs so you can see the steps being taken.
w
weezel
Voice
Posts: 3
Joined: Thu Oct 07, 2010 11:42 pm

Post by weezel »

just started using this a few months ago, and whenever it grabs a youtube title, it does this:

[04:41:01] <~weezel> http://www.youtube.com/watch?v=0jhu7ux4 ... re=related
[04:41:06] <@BusBot> weezel's Youtube Title: "14 Undestructable by Gogol Bordello"
[04:41:07] <@BusBot> weezel: URL Title - } { YouTube} { - 14 Undestructable by Gogol Bordello} {

the first line from busbot is just a youtube script. the second is yours, but i couldnt find how i might get it to just plain ignore youtube urls.

also, changing

bind pubm $urltitle(pubmflags) {*://*} pubm:urltitle

how might i add more than just "://" ? for example i'd want it to ignore image extensions or any extension other than .html .php .asp and a few others. will multiple of that line work ? or do i have to put into that single line the things i want it to report on?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Add an "if" type statement,

if [string match *youtube*];#ignore

or something to that effect. It's been several years(?) since I messed with tcl & eggdrop so I don't remember the exact syntax, I suggest you RTFM :)
M
Mysticales
Voice
Posts: 26
Joined: Tue Oct 18, 2011 5:33 pm

Post by Mysticales »

rosc2112 wrote:Change the pubm bind's mask to be more specific, eg:

bind pubm $urltitle(pubmflags) {*://*.htm?} pubm:urltitle

should work.
Hello, just tried this, however that didnt work for me. Unless I am doing something wrong? Also would the above still work for php urls?

But yea, really trying to make it do 2 things:
1: Not show up for images.
2: Delete the url from being repeated when it responds. (Granted looking into that right now in the code)

Edit: Ok fixed #2
Changed
puthelp "PRIVMSG $chan :$nick: URL Title for $word - \002$urtitle\002"
to
puthelp "PRIVMSG $chan :\002$urtitle\002"

Gets a lil too spammy if it just repeats the url that the person just said.

Still cant fix the image thing to prevent that from showing up results..

Edit2: Fixed the image thing, Just remove the words "No title found" so the script returns nothing. Sloppy fix, but it works. No more parsing of image urls.
~Battlez-avec la Mystique?~
F
FightingNavyman
Voice
Posts: 35
Joined: Tue Jan 18, 2011 12:39 pm

o.o

Post by FightingNavyman »

the link isnt working anymore :(
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: o.o

Post by speechles »

FightingNavyman wrote:the link isnt working anymore :(
Good. This script is broken. It doesn't handle encodings or character sets correctly....

Instead.. Use a script that does work:
--> Durby
It's based off Webby. Since it's Webby based this means it correctly handles character sets, http versions, patched or unpatched bots, etc, etc.. This is the url grabbing script you should be using...
M
Mysticales
Voice
Posts: 26
Joined: Tue Oct 18, 2011 5:33 pm

Post by Mysticales »

Fixed my #1 issue too. Sloppy fix, but it works.

Code: Select all

		if {[regexp -nocase {<title>(.*?)</title>} $data match title]} {
			return [string map { {href=} "" \" "" } $title]
		} else {
			return 
		}
	}
}

putlog "Url Title Grabber $urltitlever (rosc) script loaded.."
Its at the end, basically removed the whole "Return" response. Since whats the point of it saying there is no url title. No longer responds to picture images. =)

As for it being broken.. I dont know, I mean I get some glitches on it sure. But it works fine enough.

Also That Durby is an Unstable script right now, seems to be down. I could upload this file if needed for the urltitle one if needed?
~Battlez-avec la Mystique?~
User avatar
prashant
Voice
Posts: 11
Joined: Fri Jan 10, 2014 6:07 pm
Location: irc.rizon.net ~ #pd

Post by prashant »

i need this Script! AnyOne Have working Script - Please Provide - Mirror Link & New Link of this Nick Script :D
Post Reply