diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -631,9 +631,9 @@ RSSHEAD sort -r "${list_file}" | head -n 20 | while IFS= read -r line; do # Line format: - [DATE] [TITLE](URL) local date title url - date="$(echo "${line}" | grep -oP '\[\K[0-9]{4}-[0-9]{2}-[0-9]{2}(?=\])')" - title="$(echo "${line}" | grep -oP '\]\s+\[\K[^\]]+(?=\]\()')" - url="$(echo "${line}" | grep -oP '\]\(\K[^)]+(?=\))')" + date="$(echo "${line}" | sed -n 's/.*\[\([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\)\].*/\1/p')" + title="$(echo "${line}" | sed -n 's/.*\] \[\([^]]*\)\](.*/\1/p')" + url="$(echo "${line}" | sed -n 's/.*\](\([^)]*\)).*/\1/p')" [[ -z "${date}" || -z "${title}" || -z "${url}" ]] && continue # RFC 2822 date from YYYY-MM-DD |
