Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to download Douban girl pictures by python crawler

Shulou Source: shulou.com Published: 2022-06-01 19:12:50 10月06日 Update

This article mainly explains "python crawler how to download Douban girl picture", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "python crawler how to download Douban girl picture"!

The code is as follows:

Import requestsimport reimport timefrom bs4 import BeautifulSoup

Cat = '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 ('

Tags: Pictures girls reptiles Douban learning content code picture downloads that is ideas situations articles more knowledge knowledge points articles follow links problems deal with Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB Huawei Redmi Apple