Jump to content
UBot Underground

How To Scrape Only Certain Part Of A Text String


Recommended Posts

I want to scrape dates from a webpage, 

like 

https://www.etsy.com/shop/GreatLifeTees/reviews

 

under review there is date of review posted, I want to scrape the name and date, I could scrape name but not date can someone plz let me know how this can be done..

 

Thanks 

please let me know any regex code or other way..

 

Many thanks in advance

Link to post
Share on other sites

In this case you could just do this:

set(#firstReviewer,$scrape attribute($element offset(<class="shop2-review-attribution">,0),"innertext"),"Global")
add list to list(%reviewerSplit,$list from text(#firstReviewer," on "),"Delete","Global")

But if you grab the whole thing and want the date you could also use this regex:

set(#date,$find regular expression(#firstReviewer,"[A-Z][a-z]+\\s\\d+,\\s20[0-9]+"),"Global")
  • Like 2
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...