mirror of
https://github.com/d0zingcat/RSSHub-python.git
synced 2026-05-16 07:26:46 +00:00
format timestamp in chouti pubdate
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
|
import arrow
|
||||||
from rsshub.utils import DEFAULT_HEADERS
|
from rsshub.utils import DEFAULT_HEADERS
|
||||||
|
|
||||||
domain = 'https://dig.chouti.com'
|
domain = 'https://dig.chouti.com'
|
||||||
@@ -11,7 +12,7 @@ def parse(post):
|
|||||||
chouti_link = domain + '/link/' + str(post['id'])
|
chouti_link = domain + '/link/' + str(post['id'])
|
||||||
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
||||||
item['link'] = post['originalUrl']
|
item['link'] = post['originalUrl']
|
||||||
item['pubDate'] = str(post['created_time'])[0:10]
|
item['pubDate'] = arrow.get(post['created_time']).isoformat()
|
||||||
item['author'] = post['submitted_user']['nick']
|
item['author'] = post['submitted_user']['nick']
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
|
import arrow
|
||||||
from rsshub.utils import DEFAULT_HEADERS
|
from rsshub.utils import DEFAULT_HEADERS
|
||||||
|
|
||||||
domain = 'https://dig.chouti.com'
|
domain = 'https://dig.chouti.com'
|
||||||
@@ -10,7 +11,7 @@ def parse(post):
|
|||||||
chouti_link = domain + '/link/' + str(post['id'])
|
chouti_link = domain + '/link/' + str(post['id'])
|
||||||
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
||||||
item['link'] = post['originalUrl']
|
item['link'] = post['originalUrl']
|
||||||
item['pubDate'] = str(post['created_time'])[0:10]
|
item['pubDate'] = arrow.get(post['created_time']).isoformat()
|
||||||
item['author'] = post['submitted_user']['nick']
|
item['author'] = post['submitted_user']['nick']
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
|
import arrow
|
||||||
from rsshub.utils import DEFAULT_HEADERS
|
from rsshub.utils import DEFAULT_HEADERS
|
||||||
|
|
||||||
domain = 'https://dig.chouti.com'
|
domain = 'https://dig.chouti.com'
|
||||||
@@ -11,7 +12,7 @@ def parse(post):
|
|||||||
chouti_link = domain + '/link/' + str(post['id'])
|
chouti_link = domain + '/link/' + str(post['id'])
|
||||||
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
item['description'] = post['title'] + '<br /> <br />' + f'<a href="{chouti_link}" target="_blank">抽屉链接</a>'
|
||||||
item['link'] = post['originalUrl']
|
item['link'] = post['originalUrl']
|
||||||
item['pubDate'] = str(post['created_time'])[0:10]
|
item['pubDate'] = arrow.get(post['created_time']).isoformat()
|
||||||
item['author'] = post['submitted_user']['nick']
|
item['author'] = post['submitted_user']['nick']
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user