Skip to main content
Question

CSS Selector


checcosisani
Contributor
Forum|alt.badge.img+12

Hi

which is the correct css to extratc only the first div

image 

 

this not work

#tabella > tbody > tr:nth-child(-n+30) > td.text-left > div:first-child

 

thx

Francesco

4 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • August 10, 2023

Are you looking to extract the first word from that column in each row of the table, i.e. excluding the part in italics and the part in bold?


checcosisani
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • August 10, 2023

Yes


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • August 10, 2023
checcosisani wrote:

Yes 

I don't think  you can do that through css selector alone. You should be able to select the entire text with .DataText2 and then use some regex in a stringsearcher to grab just the first portion of text

[\w\s\d]+

 


checcosisani
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • August 13, 2023
ebygomm wrote:

I don't think  you can do that through css selector alone. You should be able to select the entire text with .DataText2 and then use some regex in a stringsearcher to grab just the first portion of text

[\w\s\d]+

 

Ok 

also in this case isn't possible to extract the part after span ?

image 

article:nth-child(-n+30) > div > div:nth-child(3)> div > p:nth-child(3) > span

 

thx

 

Francesco


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings