Commit 3e9e31ee authored by Aurélio A. Heckert's avatar Aurélio A. Heckert

Support crazy dates

parent 5cc7e3fe
......@@ -84,8 +84,14 @@ fi
download $url $slug.ORIG.html
if (grep -q 'id="data"' $slug.ORIG.html); then
if (egrep -q '<span id="data">Atualizado em\s*</span>' $slug.ORIG.html); then
pub_day=1
pub_month=1
pub_year=1999
pub_time=12:00
fi
eval $(grep 'id="data"' $slug.ORIG.html |
sed -r 's#.*<span id="data">Atualizado em ([0-9]+)( [ae] [0-9]+)? DE ([a-z]+)( DE ([0-9]+))?( ás ([0-9:]+))?</span>.*#\
sed -r 's#.*<span id="data">Atualizado em ([0-9]+)( [ae] [0-9]+|[0-9, ]*)? DE ([a-z]+)( DE ([0-9]+))?( ás ([0-9:]+))?</span>.*#\
pub_day=\1;\
pub_month=\3;\
pub_year=\5;\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment