将以下代码中的username和password改成自己的就行了
执行出错的话,请使用pip安装requests库
pip install requests
import requests url='http://www.hostloc.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&inajax=1' username='xxx' password='xxx' data={'username':username,'password':password} headers={'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'} req=requests.Session() res=req.post(url=url,data=data,headers=headers) for a in range(10): req.get('http://www.hostloc.com/space-uid-'+str(a)+'.html')