update Adult list #2
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: update Adult list | |
on: | |
watch: | |
types: started | |
schedule: | |
- cron: "00 0 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set git identity | |
run : | | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
sudo timedatectl set-timezone "Asia/Shanghai" | |
- name: Update | |
run: | | |
# 成人源 | |
# adultiptv.net | |
wget http://adultiptv.net/chs.m3u -O Adult_adultiptv.m3u | |
sed -i -n '/XXX/,+1p' Adult_adultiptv.m3u | |
sed -i 's/XXX/adultiptv/' Adult_adultiptv.m3u | |
sed -i 's/AdultIPTV.net //g' Adult_adultiptv.m3u | |
sed 's/group-title="/group-title="IPTV·/g' Adult_adultiptv.m3u | |
# YueChan Adult | |
wget https://raw.githubusercontent.com/YueChan/Live/main/Adult.m3u -O Adult_YueChan.m3u | |
sed -i -n '/group-title=/,+1p' Adult_YueChan.m3u | |
sed -i 's/成人/YueChan/' Adult_YueChan.m3u | |
sed 's/group-title="/group-title="IPTV·/g' Adult_YueChan.m3u | |
# YanG-1989 Adult | |
wget https://raw.githubusercontent.com/jiaoting/IPTV/Files/AdultVOD.m3u -O Adult_YanG-1989.m3u | |
sed 's/group-title="/group-title="VOD·/g' Adult_YanG-1989.m3u | |
# Adult整合源 | |
rm -f Adult.m3u && touch Adult.m3u | |
cat Adult_adultiptv.m3u >> Adult.m3u | |
cat Adult_YueChan.m3u >> Adult.m3u | |
cat Adult_YanG-1989.m3u >> Adult.m3u | |
sed -i '/#EXTM3U/d' Adult.m3u | |
sed -i '1i #EXTM3U' Adult.m3u | |
sed -i '/^\s*$/d' Adult.m3u | |
rm -f Adult_adultiptv.m3u | |
rm -f Adult_YueChan.m3u | |
rm -f Adult_YanG-1989.m3u | |
- name: Apply | |
run: | | |
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤") | |
git add . | |
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M:%S)" | |
git push -f |