Re: [NC] Help with handle writing

2001-05-24 Thread Nikol Su

On Wed, 23 May 2001 14:19:03 -0400 (EDT), you wrote:

>  > I need to get rid of the 'style="text-decoration:none" ' and also the
>  > ""
>  
>  Check out StripAttributes and StripTags. Documentation is here:
>  
>  http://www.newsclipper.com/writinghandlers.html
>  
>  You want to do something like:
>  
>@$data = grep { $_ = StripAttributes($_,'style') } @$data;
>@$data = grep { $_ = StripTags($_,'br') } @$data;
>  
>  David

Thanks David, it is now working after I added those two lines.:)
I will try to upload the handle into the pool.

--
Nikol
If you would like to unsubscribe from this mailing list send an email to
[EMAIL PROTECTED] with the body "unsubscribe newsclipperlist
YOUR_EMAIL_ADDRESS" (without the quotes).



Re: [NC] Help with handle writing

2001-05-23 Thread David Coppit

On Thu, 24 May 2001, Nikol Su wrote:

> The result is:
>  http://www.theinquirer.net/14050107.htm";
> style="text-decoration:none"> Intel overclocks Pentium 4 
>
> I need to get rid of the 'style="text-decoration:none" ' and also the
> ""

Check out StripAttributes and StripTags. Documentation is here:

http://www.newsclipper.com/writinghandlers.html

You want to do something like:

  @$data = grep { $_ = StripAttributes($_,'style') } @$data;
  @$data = grep { $_ = StripTags($_,'br') } @$data;

David


David Coppit <[EMAIL PROTECTED]>President, Spinnaker Software
http://www.newsclipper.com/ -- Snip and ship dynamic content to your website

If you would like to unsubscribe from this mailing list send an email to
[EMAIL PROTECTED] with the body "unsubscribe newsclipperlist
YOUR_EMAIL_ADDRESS" (without the quotes).



[NC] Help with handle writing

2001-05-23 Thread Nikol Su

I normally can get away with some very simple handles.
I need some help with this one:

My current handle is as:


>sub Get
>{
  my $self = shift;
  my $attributes = shift;

  my $startPattern = 'inq.js';
  my $endPattern = 'bg_stripes';

  my $url = $self->ComputeURL($attributes);

  my $data = GetLinks($url,$startPattern,$endPattern);
  return undef unless defined $data;

  return $data;
>}


The result is:
 http://www.theinquirer.net/14050107.htm";
style="text-decoration:none"> Intel overclocks Pentium 4 

I need to get rid of the 'style="text-decoration:none" ' and also the
""

The html for the source is as:

===


Intel overclocks Pentium 4

=
I tried to copy the technic used by other handles, but could not get any
result. Please help.:)

Thanks

--
Nikol
If you would like to unsubscribe from this mailing list send an email to
[EMAIL PROTECTED] with the body "unsubscribe newsclipperlist
YOUR_EMAIL_ADDRESS" (without the quotes).