skip to Main Content

Importing using importxml code:

=LET(list, IMPORTXML("https://www.officialcharts.com/charts/dance-singles-chart/20240212/104/", "//*[@id='__nuxt']/div[3]/div/main/div[2]/section/div/div/div/div/div/div[2]/p/a/span"), WRAPROWS(BYROW(list, LAMBDA(r, JOIN("", r))), 2))

The errors are to do with pulling unwanted text from column 1 chart positions NEW and Re get pulled in and causes table data to jump out of line. In different cells.
Could be to do with /div [2] [3]

Changing the /div and numbers

2

Answers


  1. try:

    =WRAPROWS(QUERY(TOCOL(IMPORTXML(
     "https://www.officialcharts.com/charts/dance-singles-chart/20240212/104/", 
     "//*[@id='__nuxt']//*/*/*/*/*/*/*/*/p/a"), 1), 
     "where not Col1 matches 'New|RE'", ), 2)
    

    enter image description here

    or:

    =LET(list, IMPORTXML("https://www.officialcharts.com/charts/dance-singles-chart/20240212/104/", 
     "//*[@id='__nuxt']/div[3]/div/main/div[2]/section/div/div/div/div/div/div[2]/p/a/span"), 
     WRAPROWS(QUERY(BYROW(list, LAMBDA(r, JOIN(, r))), "where not Col1 matches '^(RE|New)$'", ), 2))
    

    enter image description here

    Login or Signup to reply.
  2. You may try:

    =let(Σ,tocol(importxml("https://www.officialcharts.com/charts/dance-singles-chart/20240209/104/","//*[@id='__nuxt']/div[3]/div/main/div[2]/section/div/div/div/div/div/div/p/a"),1),
     wraprows(filter(Σ,Σ<>"New",Σ<>"RE"),2))
    

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search