mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-14 23:16:50 +00:00
format cls timestamp string
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import requests
|
||||
import json
|
||||
import arrow
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
|
||||
@@ -10,7 +11,7 @@ def parse(post):
|
||||
articleid = post['ArticleId']
|
||||
item['link'] = f'https://api3.cls.cn/share/article/{articleid}?os=android&sv=734&app='
|
||||
item['author'] = post['ArticleAuthor']
|
||||
item['pubDate'] = post['ArticleTime']
|
||||
item['pubDate'] = arrow.get(int(post['ArticleTime'])).isoformat()
|
||||
return item
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import requests
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
|
||||
import arrow
|
||||
|
||||
def parse(post):
|
||||
item = {}
|
||||
item['title'] = post['title'] if post['title'] != '' else post['content']
|
||||
item['description'] = post['content']
|
||||
item['link'] = post['shareurl']
|
||||
item['pubDate'] = post['ctime']
|
||||
item['pubDate'] = arrow.get(int(post['ctime'])).isoformat()
|
||||
return item
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import requests
|
||||
import feedparser
|
||||
import arrow
|
||||
|
||||
from rsshub.utils import DEFAULT_HEADERS
|
||||
from rsshub.utils import fetch
|
||||
|
||||
def parse(post):
|
||||
item = {}
|
||||
item['title'] = post.title
|
||||
item['description'] = post.summary
|
||||
item['pubDate'] = post.published if post.has_key('published') else ''
|
||||
item['pubDate'] = post.published if post.has_key('published') else arrow.now().isoformat()
|
||||
item['link'] = post.link
|
||||
item['author'] = post.author if post.has_key('author') else ''
|
||||
return item
|
||||
|
||||
Reference in New Issue
Block a user