Fetch FF Cover Every Week #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Fetch FF Cover Every Week" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 22 * * 4' | |
jobs: | |
job_1: | |
name: Fetch FF Cover | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch FF Cover | |
run: | | |
current=`date "+%Y-%m-%d %H:%M:%S"` | |
timeStamp=`date -d "$current" +%s` | |
currentTimeStamp=$((timeStamp*1000+10#`date "+%N"`/1000000)) | |
rm -rf ffdec | |
rm -rf xhxCover | |
mkdir xhxCover | |
wget https://github.com/jindrapetrik/jpexs-decompiler/releases/download/version14.2.1/ffdec_14.2.1.zip | |
mkdir ffdec ; mv ffdec_14.2.1.zip ./ffdec/ | |
cd ffdec | |
unzip ffdec_14.2.1.zip | |
wget http://hua.61.com/resource/baseUI/fisrtPage.swf?version=$currentTimeStamp -O fisrtPage.swf | |
java -Xmx3550m -jar ./ffdec.jar -export image ../xhxCover/ ./fisrtPage.swf | |
- name: Upload to this repo | |
run: | | |
rm -rf ffdec | |
cd xhxCover | |
find ./ -size -500k -exec rm {} \; || true | |
mv -n *.png cover.png || true | |
mv -n *.jpg cover.png || true | |
git pull origin master | |
git config --global user.name "No5972" # Change to your GitHub user name | |
git config --global user.email "wujiuqier@foxmail.com" # Change to your GitHub email address | |
git add "*.png" && echo "Git Added" # Guess if there are any other types of pictures - Ref: https://stackoverflow.com/questions/25083290/git-add-error-unknown-switch | |
git commit -m 'Fetch FF Cover' && echo "Git Committed" | |
git push -u origin master && echo "Git Pushed Origin" # Change to your branch to place crawled pictures |