Python: TypeError: argument of type 'NoneType' is not iterable Spider Script issue

后端 未结 2 1846
借酒劲吻你
借酒劲吻你 2021-01-27 05:24

I am working on building a link checking script to be used in monitoring a domain I manage. I am getting an error about the 9th url is ran through the findLinks() function. I

2条回答
  •  感情败类
    2021-01-27 05:44

    This is working for me and I am passed the error now:

    for link in soup.find_all('a'):
        if link.get('href'):
            # all absolute paths hrefs and add to array     
            if "google.com" in link.get('href'):
    

    Similar to testing for is not None although that did not work. Thanks all

提交回复
热议问题