request

#Third-party module 
#
1.Install#Software management tool pip3 #Add

pip3 to the environment variable
#pip3 install requests


#2, source code installation
#Download code, install

#First, go to the directory of the downloaded folder and install the command python setup .py install can be installed

import requests

#1.json #How
to install a third-party module#
request, used to send http requests (using Python to simulate browser browsing)
# response= requests.get("https://www .hlbrcbbs.cn:8443/schoolbbs/login.jsp")
# response.encoding="utf-8"
# result=response.text
# print(result) #Use
third-party module request to send HTTP request, or xml format content #Check


if qq is online
"""r=requests.get('http://www.webxml.com.cn//webservices/qqOnlineWebService.asmx/qqCheckOnline?qqCode=714155624')
result=r.text#string type
from xml.etree import ElementTree as ET #parse
xml format content
#xml takes one parameter: a string, formatted as a special object
node=ET.XML(result)
if node.text=='Y':
print("online")
else:
print('offline')"""














Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325095283&siteId=291194637