Jump to content
UBot Underground

How Use $not($contains in Scape Attributes


Recommended Posts

I am trying to scrape profiles, but my scrape is getting "contaminated" with another profile:

 

Example:

 

/profile/user210/     (desired to scrape)

/profile/user210/Reviews/     (I want to avoid these)

 

The following code doesn't help me avoid those with Reviews.   What might be be doing wrong?       Thank you.

 

 

   if($not($contains($url"Reviews"))) {
        then {
            add list to list(%url$scrape attribute(<href=w"/profile/*/">"fullhref"), "Delete""Global")

Link to post
Share on other sites

1.just to be clear are you trying to scrape the profiles on

 

/profile/user210/     (this page only)

/profile/user210/Reviews/    

 

or

 

2.are you trying to scrape profiles of a page which has a combination of the below.

 

/profile/user210/     (and you only want this)

/profile/user210/Reviews/     (I want to avoid these)

Link to post
Share on other sites

You can try with "$element offset" function and set offset to 0, which should retrieve the top most match.

 

The safer way would be to write a better attribute selector or even use REGEX.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...