Jump to content
UBot Underground

Any Idea How Best To Scrape The Star Ratings From This Page


Recommended Posts

Hi,

 

Can someone give me a clue how best one would try and scrape the star ratings from this page:

https://www.classiccarauctions.co.uk/porsche-928-s4-10946

 

I need to grab all the data into a csv and then generate a print catalogue from it.

 

The only way I am seeing to do this (the stars are the issue) is to scrape the html as "star red, star grey" and work out some search and replace in the csv which then will convert it to 4 red 1 grey etc.

 

Any other thoughts on how to get the stars out, is there another way ? am I missing something?

 

Many thanks

Andrew

Link to post
Share on other sites

try

set(#Debug,$scrape attribute($element offset(<tagname="td">,23),"outerhtml"),"Global")
alert("OVERALL: {$list total($find regular expression(#Debug,"(star-red|star-grey)"))}")
  • Like 1
Link to post
Share on other sites

Hi Pash,

Ok so as I thought one is going to have to scrape the html star-red/star-grey from each section and then test for the red stars to generate a value that can then equate to creation of the stars in indesign be that single or as a single image of 5 stars.

 

Thank you, that clears things up or confirms my initial thoughts so now have a decisive plan as to what needs to happen.

 

Andrew

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