Jump to content
UBot Underground

How To Scrape Attribute Itself And Not Their Values ?


Recommended Posts

Hi All,

 

From the below html want to just scrape "?cat=dra_896".  How to do this ?.

 

---------------------------------------------------------

<a class="cat-filter" data-url="?cat=dra_896">
Dragon
 
</a>
----------------------------------------------------------
If someone wondering why do i need this ?, Just a Background, On the target website this is a category filter, when ever you click this element, the link will reflect this content with different data on the page loaded accordingly, So i want to store this values in a list. Please let me know if you need more details. Have tried all the different things but no luck.
 
Appreciate help from the community.
 
Thanks.
Link to post
Share on other sites

Thanks for both Software and v_ladimir, It did the trick.

 

Here is what i did as a reference for others, in case facing the same issue.

 

add list to list(%cat,$find regular expression($document text,"(?<=data-url\\=\").*(?=\\\">)"),"Delete","Global")

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...