hardikvasa / google-images-download

Python Script to download hundreds of images from 'Google Images'. It is a ready-to-run code!
MIT License
8.57k stars 2.11k forks source link

关于无法下载图片的猜想 #388

Open zh19990906 opened 10 months ago

zh19990906 commented 10 months ago

Finding 'Next Image' from the given raw page

def _get_next_item(self,s):
    start_line = s.find('rg_meta notranslate')
    if start_line == -1:  # If no links are found then give an error!
        end_quote = 0
        link = "no_links"
        return link, end_quote
    else:
        start_line = s.find('class="rg_meta notranslate">')
        start_object = s.find('{', start_line + 1)
        end_object = s.find('</div>', start_object + 1)
        object_raw = str(s[start_object:end_object])

..... s.find('rg_meta notranslate') 这函数的解析目前搜索出来的结果是根本搜索不到的,而且现在默认情况下只能返回20张图片,这也是为什么很多人只能下载20张图片的原因。