In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to use Python to climb beautiful women, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
1 data source
The pictures that appear in all the questions answered under the topic "Beauty"
2 grab tool
Python 3, and use third-party libraries Requests, lxml, AipFace, with a total of 100 + lines of code
3 necessary environment
Mac / Linux / Windows (Linux has not been tested, in theory. Most of the reactions in Windows were abnormal before, but windows has restricted the characters in the local file name and used regular filtering.)
There is no need to log in to Zhihu (that is, there is no need to provide the password of Zhihu account)
Face detection service requires a Baidu cloud account (that is, Baidu network disk / post bar account)
4 face detection database
AipFace, provided by Baidu Cloud AI open platform, is a Python SDK that can detect faces. You can access it directly through HTTP and use it for free.
5 detect the filter condition
Filter all non-appearing face pictures (such as landscape pictures, unexposed body photos, etc.)
Filter all non-women (in the crawl, it is found that Zhihu male pictures are basically stars, so they are not considered; there is a case of inaccurate gender identification in AipFace)
Filter all non-real characters, such as anime characters (AipFace Human confidence less than 0.6)
Filter all images with low appearance score (AipFace beauty attribute is less than 45, to save storage space; again, AipFace score does not have any objectivity)
6 implementation logic
Initiate a HTTP request through Requests to get a partial discussion list under "Beauty"
Parse the HTML in each discussion captured by lxml, and get the corresponding src attributes of all img tags in it.
Initiate a HTTP request through Requests, and download the src attribute to point to the image (regardless of moving image)
Face detection of the image through AipFace request
Determine whether a human face is detected and filter using "4 detection filter conditions"
Persist the filtered image to the local file system, and the file name is face + author + question name + serial number.
Return to the first step and continue
7 grab the result
Store it directly in the folder (angelababy strength exit). In addition, apart from baby, 88 is the highest score for the pictures captured so far. Personally, I object to the ranking, but my wife is not the highest score.
Code
9 Operation preparation
Install Python 3 perfect download Python
Install requests, lxml, baidu-aip libraries, all of which can be installed through pip, with one command
Apply for Baidu cloud testing service, free of charge. Face recognition-Baidu AI
After reading the above, have you mastered the method of how to climb a beautiful woman with Python? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.