Created
          January 20, 2018 08:56 
        
      - 
      
- 
        Save zoonderkins/4134be0cd84f08d97f549d1d66308b0e to your computer and use it in GitHub Desktop. 
    [Vanilla JS script scrab hacker news] #javascript
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | https://news.ycombinator.com/ | |
| JSON.stringify([...document.querySelectorAll('td.title:nth-child(3)')].map(el => ({ | |
| title: el.querySelector('a').innerText, | |
| url: el.querySelector('a').getAttribute('href') | |
| })), null, 2) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment