Crawler Basic Practice-python crawler download Watercress Sister pictures

Source: Internet
Author: User
Download the pictures on the specified website, only the first 100 pages of pictures, you can set the number of pages according to your needs
Cat value is a picture type, you can change your own cat value experience, have a question to me, see will answer
2 = Big breasted Sister
3 = US Leg control
4 = with a Yan value
5 = Hodgepodge
6 = Small Hips

Import requestsimport reimport timefrom bs4 Import beautifulsoupcat = ' 2 ' img = ' http://www.dbmeinv.com/dbgroup/show.htm?    Cid= ' + catend = '/dbgroup/show.htm?cid= ' + cat + ' &pager_offset=100 ' urls = []def geturls (Mainurl): Time.sleep (1) headers = {' user-agent ': ' mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) applewebkit/537.36 (khtml, like Gecko) chrome/47.0.2526.80 safari/537.36 '} HTML = Requests.get ( Mainurl). Text soup = beautifulsoup (html, ' Html.parser ') Picurl = Re.findall ('
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.