]> CyberLeo.Net >> Repos - CDN/taggery.git/blob - lib/profiles/sankakucomplex.sh
Update sankakucomplex image url filter to fix timestamp
[CDN/taggery.git] / lib / profiles / sankakucomplex.sh
1 sankakucomplex_can_handle() {
2   local url="${1}"
3   echo "${url}" | grep -qi 'chan.sankakucomplex.com/post/show/[0-9]*' || return 1
4   taggery_id_filter=sankakucomplex_id_filter
5   taggery_fmturl="https://chan.sankakucomplex.com/post/show/%s"
6   taggery_image_url_filter=sankakucomplex_image_url_filter
7   taggery_image_tags_filter=sankakucomplex_image_tags_filter
8   taggery_user_agent="MyBrowse/1.1 (GS/OS 6.0.6; AppleIIgs)"
9 }
10 sankakucomplex_id_filter() {
11   sed -e 's#^.*/post/show/\([0-9]\+\)\($\|/.*$\)#\1#'
12 }
13 sankakucomplex_image_url_filter() {
14   sed -e '/Original:/!d; s/^[^"]*"\([^"]*\)".*$/https:\1/; s/&/\&/g'
15 }
16 sankakucomplex_image_tags_filter() {
17   sed -e '/<ul id=tag-sidebar>/,/<\/ul>/!d; /li/!d; s/<\/li>/&\n/g' | sed -e 's/^.*<a href="\/?tags=\([^"]*\)".*$/\1/'
18 }