Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const feedItems = document.querySelectorAll('.feed_wrapper_UXNAU .content_wrapper_mkIJf');
- const data = [];
- data.push('Name\tDate\tContent');
- feedItems.forEach(item => {
- try {
- const name = item.querySelector('div:first-child div:first-child div:nth-child(2) div:nth-child(2) div:first-child div:first-child strong').textContent.trim();
- const date = item.querySelector('div:first-child div:first-child div:nth-child(3) div:first-child').textContent.trim();
- const content = item.querySelector('div:first-child div:nth-child(2) div:first-child div:first-child div:first-child').textContent.trim();
- data.push(`${name}\t${date}\t${content}`);
- } catch (error) {
- console.error('Error extracting data from an item:', error);
- }
- });
- console.log(data.join('\n'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement