modify database schema
This commit is contained in:
@@ -51,8 +51,9 @@ const getLastPost = async (pageid = '') => {
|
||||
let time = timeEl.attr('data-utime')
|
||||
let link = timeEl.parent().attr('href')
|
||||
let p = t('div.userContent')
|
||||
let txt = p.first().text()
|
||||
let txt = p.text() || ''
|
||||
let id = p.first().attr('id')
|
||||
|
||||
if (!id) {
|
||||
if (/[\?|&]id\=(\d+)/.test(link)) { // eslint-disable-line
|
||||
let m = link.match(/[\?|&]story_fbid\=(\d+)/) // eslint-disable-line
|
||||
@@ -64,9 +65,15 @@ const getLastPost = async (pageid = '') => {
|
||||
if (m !== null && m.length > 1) {
|
||||
id = m[1]
|
||||
}
|
||||
} else if (/\/photos\/.+?\/(\d+)/.test(link)) {
|
||||
let m = link.match(/\/photos\/.+?\/(\d+)/)
|
||||
if (m !== null && m.length > 1) {
|
||||
id = m[1]
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!time || !link || !txt || !id) return null
|
||||
console.log(time, link, txt, id)
|
||||
if (!time || !link || !id) return null
|
||||
let tmp = {
|
||||
txt,
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user