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
function reverseChild(pare) { | |
if (!pare.children || pare.children.length < 2) return; | |
var emptyParent = document.createElement(pare.nodeName); | |
var detachedParent = pare.parentNode.replaceChild(emptyParent, pare); | |
var emptyLeft = document.createElement(detachedParent.children[0].nodeName); | |
var emptyRight = document.createElement(detachedParent.children[0].nodeName); | |
for (var i = 0, len = detachedParent.children.length; i < Math.floor(len/2); i++) { | |
var left = detachedParent.replaceChild(emptyLeft, detachedParent.children[i]); |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'rss' | |
def read_list() | |
f = File.open("feeds.txt", "r") | |
urls = f.readlines | |
f.close | |
urls.each do |url| |