fortune500 icon indicating copy to clipboard operation
fortune500 copied to clipboard

2020 Data

Open jroakes opened this issue 4 years ago • 1 comments

Here is 2020 data pulled from: https://fortune.com/fortune500/2020/search/

Data: https://pastebin.com/SPqSYk9n

Pulled all 1k using the code below by clicking through each 100 results and running the code below. Collected today.

// If text is not set initialize and add heading row.
if (typeof(text) == 'undefined' || !text.length){

    var text = ""
    // Add Headings
    var rowText = ""; 
    $$('.searchResults__columnTitle--1Brf4').forEach((e)=>{ rowText += e.textContent.replace(',', ' ') + ","; });
    text += rowText.slice(0, -1) + "\n";
};


// Loop through table adding rows.
$$('.rt-tr-group').forEach((e)=>{ var rowText = ""; 
                                  e.querySelectorAll('span').forEach((i) => {
                                      rowText += i.textContent.replace(',', '') + ","; 
                                      }); 

                                      text += rowText.slice(0, -1) + "\n"; 
                                      }
                           );

jroakes avatar Dec 21 '20 13:12 jroakes

@cmusam please add 2020 data to the /csv folder

slavakurilyak avatar Apr 18 '21 03:04 slavakurilyak