Created
September 19, 2017 09:50
-
-
Save Rukomoynikov/076aede1c39b0593b295e0d97ec8860b to your computer and use it in GitHub Desktop.
harb
This file contains 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
var list = [] | |
var articles = document.querySelectorAll('.post_preview'); | |
for (var i = 0; i < articles.length; i++) { | |
var title = articles[i].querySelector('.post__title_link') | |
var author = articles[i].querySelector('.user-info__nickname') | |
list.push({ | |
title: title.innerText, | |
url: title.getAttribute('href'), | |
author: author.innerText | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment