HTTPR Meimei Coffee Development 182, 182, 23, 696e Meimei Coffee System Software Development Sponse type objects include methods: read(), readinto(), getheader(name), getheaders(), fileno(), etc.
sg、version、status、reason、debuglevel、closed等
API of urlopen() function:
headers parameter:
1. Request headers
2. It can be constructed directly in the dictionary, or it can be added with the add_header() method
3. User-Agent can be changed to Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) [Note] fake browser access
origin_req_host parameter: refers to the host name or IP address of the requester
Kafka usage scenarios:
1. Website activity tracking: user activity tracking, search, browsing, click-through rate, etc., publishing operation information to different topics, real-time monitoring of data, and statistical analysis of user behavior.
2. Log aggregation: as a solution for log aggregation (the function of log aggregation is to aggregate logs from different applications on different servers and store them on a single server for easy search and analysis)
urlunsplit()
Similar to urlunparse(), splicing each part, the length must be 5
5. urljoin ()
Generate links, provide a base-url scheme, netloc, and path 3 contents and supplement the missing parts of the new link.
[Note] Both of them have the latest, if they are not complete, they will complement each other.
6. urlencode()