What's article_body empty list or do it contain something?
It work fine i i test with code over like this.
It work fine i i test with code over like this.
>>> span_tag = soup.select('a span') >>> article_body = [] >>> for tag in span_tag: ... article_body.append(tag.text.strip()) ... >>> len(article_body) 2 >>> article_body[0] 'Google warns of US national security risks from Huawei ban'