googleimg.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:tulen 作者: detorto 项目源码 文件源码
def get_images_urls(soup):
    a =  soup.find_all("a",{"class":"gallery__item carousel__item"})
    if len(a) == 0:
        return []
    images_urls = []
    for img in a:
        h = img.get("href")
        parsed = urlparse.urlparse(h)
        image = urlparse.parse_qs(parsed.query)['img_url'][0]
        images_urls.append(image)

    return images_urls

#temp_name = next(tempfile._get_candidate_names())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号