parent
0aed6e9b20
commit
7e8d66eacd
|
|
@ -46,19 +46,14 @@ module.exports = async (ctx) => {
|
|||
const cat_img = $(a[i])
|
||||
.find('div.icon_float > a')
|
||||
.html();
|
||||
const date_raw = $(a[i]).find('div.talk_time');
|
||||
$(date_raw)
|
||||
.find('div.icon_float')
|
||||
.remove();
|
||||
$(date_raw)
|
||||
.find('span.user')
|
||||
.remove();
|
||||
$(date_raw)
|
||||
.find('b')
|
||||
.remove();
|
||||
const date_str_zh = $(date_raw)
|
||||
.text()
|
||||
.replace(/^[^`]*发表于(.*分)[^`]*$/g, '$1'); // use [^`] to match \n
|
||||
const date_raw = $(a[i])
|
||||
.find('div.talk_time')
|
||||
.clone()
|
||||
.children()
|
||||
.remove()
|
||||
.end()
|
||||
.text();
|
||||
const date_str_zh = date_raw.replace(/^[^`]*发表于(.*分)[^`]*$/g, '$1'); // use [^`] to match \n
|
||||
const date_str = date_str_zh
|
||||
.replace(/[年月]/g, '-')
|
||||
.replace(/时/g, ':')
|
||||
|
|
|
|||
|
|
@ -59,9 +59,7 @@
|
|||
{{ /if }}
|
||||
|
||||
{{ if $e.category }}
|
||||
{{ each $e.category $c }}
|
||||
<category term="{{ $c }}"></category>
|
||||
{{ /each }}
|
||||
<category term="{{ $e.category }}"></category>
|
||||
{{ /if }}
|
||||
|
||||
</entry>
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
{{ if $value.enclosure_url }}<enclosure url="{{ $value.enclosure_url }}" length="{{ $value.enclosure_length }}" type="{{ $value.enclosure_type }}" />{{ /if }}
|
||||
{{ if $value.itunes_duration }}<itunes:duration>{{ $value.itunes_duration }}</itunes:duration> {{ /if }}
|
||||
{{ if $value.author }}<author><![CDATA[{{ $value.author }}]]></author>{{ /if }}
|
||||
{{ if $value.category }}<category>{{ $value.category }}</category>{{ /if }}
|
||||
</item>
|
||||
{{ /each }}
|
||||
</channel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue