反爬?

This commit is contained in:
2023-07-01 13:02:00 +08:00
parent de9ab89193
commit 6fcc4de69e
2 changed files with 8 additions and 1 deletions

View File

@@ -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