反爬?
This commit is contained in:
parent
de9ab89193
commit
6fcc4de69e
@ -3,6 +3,7 @@ sed -i "/deb-src/s/# //g" /etc/apt/sources.list
|
||||
sudo apt update
|
||||
sudo apt install python3-pyquery -y
|
||||
python3 get-newest-version-xanmod.py $1
|
||||
curl https://www.xanmod.org/
|
||||
exit
|
||||
#VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
|
||||
# add deb-src to sources.list
|
||||
|
@ -1,9 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import requests
|
||||
import pyquery
|
||||
mainVersion = int(sys.argv[1])
|
||||
programVersionList = pyquery.PyQuery(url=f"https://www.xanmod.org/")
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
|
||||
}
|
||||
get = requests.get("https://www.xanmod.org/", headers=headers).text
|
||||
programVersionList = pyquery.PyQuery(get)
|
||||
print(programVersionList)
|
||||
#release = pyquery.PyQuery()
|
||||
temp = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user