Cleanup
This commit is contained in:
parent
5ccae68c6a
commit
abaf7b918c
@ -1,8 +1,10 @@
|
||||
const pageSize = 20
|
||||
const courtesyWait = 10 * 1000
|
||||
const courtesyWait = 1000
|
||||
const tooLongAgo = 7 * 2 // Days
|
||||
|
||||
const feeds = {
|
||||
nitter: []
|
||||
nitter: [],
|
||||
tumblr: []
|
||||
}
|
||||
|
||||
const sources = {
|
||||
@ -104,23 +106,10 @@ const sources = {
|
||||
]
|
||||
}
|
||||
|
||||
const endPage = `
|
||||
<html>
|
||||
<body>
|
||||
<center>
|
||||
|
||||
<img src="end.jpg">
|
||||
<h4>You have reached the end</h4>
|
||||
<hr>
|
||||
|
||||
</center>
|
||||
</body>
|
||||
</html>`
|
||||
|
||||
module.exports = {
|
||||
feeds,
|
||||
sources,
|
||||
pageSize,
|
||||
courtesyWait,
|
||||
endPage
|
||||
tooLongAgo
|
||||
}
|
17
index.js
17
index.js
@ -131,19 +131,6 @@ const getImages = (user, description) => {
|
||||
|
||||
const processNitter = (rss, user) => {
|
||||
return processRss(rss, (item, description) => {
|
||||
// if(dcCreatorRegex.test(item))
|
||||
// return
|
||||
|
||||
// let images = []
|
||||
|
||||
// for(let [, url] of getImageMatches(description) ) {
|
||||
// images.push(url)
|
||||
// }
|
||||
|
||||
// if(images.length > 0) {
|
||||
// return { images, user }
|
||||
// }
|
||||
|
||||
let creator = item.getElementsByTagName('dc:creator')[0]
|
||||
|
||||
if(creator.innerHTML.slice(1) === user)
|
||||
@ -158,9 +145,7 @@ const handleTumblrUser = async (user) => {
|
||||
return processTumblr(rss, user)
|
||||
}
|
||||
|
||||
const processTumblr = (rss, user) => {
|
||||
// const unescapedRss = unescape(rss)
|
||||
|
||||
const processTumblr = (rss, user) => {
|
||||
return processRss(rss, (item, description) => {
|
||||
let reblog = description.querySelector('p > a.tumblr_blog')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user