Chrome Copy Text Web Pages

Hi,
How copy text in web pages to KM variable?

Thank you

Hey @kamilek,

It’s hard to say without being able to test.

Can you post the actual URL of the page in question?

-Chris

If that is the only place on the web page that “data-price” appears, then you can use the Get a URL action to get the page, and then use the Search using Regular Expression action to get the data from the result.

Example
http://allegro.pl/od-reki-3-11-iphone-x-10-64gb-space-gray-pz-i7030126034.html

Hey @kamilek,

Okay, that helps.

Try this.

-Chris


Get Price from Allegro Item Page in Safari.kmmacros (5.7 KB)

1 Like

Thanks a lot :grinning:

What if I only want the price to be in the clipboard?

Hey Sam,

I'd need to see an example page containing the data you want to scrape.

@kamilek's example no longer works; they've changed the code to obfuscated it.

-Chris

Hi Chris,

Thanks for your help! Please see the image for the page containing. I would like to copy the following data to the clipboard but only the data below.

  • Rayon Spandex Round Neck Floral Chic Long Dress

  • $15.75

  • DC3516 Knit Sleeveless Maxi Floral Dress

Below is the html code for the above.

  • h2 class="vd_item_name jsItemName">Rayon Spandex Round Neck Floral Chic Long Dress</h2

  • span class="unitPrice">$15.75</span

  • h2 class="vd_name vd_name_small jsProductName">DC3516 Knit Sleeveless Maxi Floral Dress</h2

What's if the class is pre (pre class)?