Last active
October 12, 2015 09:58
-
-
Save lsongdev/d61c5dec2359a9a324b9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # curl -s https://gist.githubusercontent.com/song940/d61c5dec2359a9a324b9/raw/mp4ba.sh | bash | |
| URL="http://www.mp4ba.com" | |
| for i in `seq 71`; do | |
| INDEX_CONTENT=$(curl -s "$URL/index.php?page=$i") | |
| HASH=$(echo $INDEX_CONTENT | grep -o "hash=\w*") | |
| for hash in `echo $HASH`; do | |
| PAGE_CONTENT=$(curl -s "$URL/show.php?$hash") | |
| NAME=$(echo $PAGE_CONTENT | awk 'BEGIN{IGNORECASE=1;FS="<title>|</title>";RS=EOF} {print $2}' | sed -e "s/ - 高清Mp4吧-免费高清电影资源下载 - Powered by Mp4Ba.Com//") | |
| SIZE=$(echo $PAGE_CONTENT | grep -o "文件总大小:\d*\.\d*[G|M]B" | sed -e "s/文件总大小://") | |
| HASH=$(echo $PAGE_CONTENT | grep -o "hash=\w*" | sed -e "s/hash=//") | |
| CATEGIRY=$(echo $PAGE_CONTENT | grep -o "sort_id=\d*\">\S*</a>" | tail -n1 | sed -e "s/sort_id=.*\">//" | sed "s/<\/a>//") | |
| echo "$NAME $SIZE $HASH $CATEGIRY" | |
| done | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment