Beautifulsoup: findAll recursive doesn't work
<p>I'm trying to get articles from wired.com.
Generally their articles' content look like this:</p>

<pre><code>&lt;article itemprop="articleBody"&gt;
   &lt;p&gt;Some text&lt;/p&gt;
   &lt;p&gt;Next text&lt;/p&gt;
   &lt;p&gt;...&lt;/p&gt;
   &lt;p&gt;...&lt;/p&gt;
&lt;/article&gt;
</code></pre>

<p>or like this:</p>

<pre><code>&lt;article itemprop="articleBody"&gt;
    &lt;div class="listicle-captions marg-t..."&gt;
        &lt;p&gt;&lt;/p&gt;

    &lt;/div&gt;

 &lt;/article&gt;
</code></pre>

<p>So I want if the page is of type 1, the <code>&lt;p&gt;</code> and <code>&lt;h&gt;</code> are extracted, while if the page is of type 2 - do something else. So, if the <code>&lt;p&gt;</code> and <code>&lt;h&gt;</code> are direct descendants of <code>&lt;article&gt;</code>, then it's type 1.
  I tried the following code, it looks for <code>&lt;p&gt;</code> and <code>&lt;h&gt;</code> and prints out the tag names. The thing is, the <code>recursive="False"</code> doesn't seem to help because when tested on type 2 page, it finds the tags, while it shouldn't (I espected to get a <code>NonType</code> object).</p>

<pre><code>import urllib.request
from bs4 import BeautifulSoup
import datetime
import html
import sys

articleUrl="https://www.wired.com/2016/07/greatest-feats-inventions-100-years-boeing/"

soupArticle=BeautifulSoup(urllib.request.urlopen(articleUrl), "html.parser")

articleBody=soupArticle.find("article", {"itemprop":"articleBody"})
articleContentTags=articleBody.findAll(["h1", "h2","h3", "p"], recursive="False")

for tag in articleContentTags:
    print(tag.name)
    print(tag.parent.encode("utf-8"))
</code></pre>

<p>Why doesn't it work?</p>

<p>PS Also, is there a difference between using <code>findAll</code> and <code>findChildren</code> in general and in this particular case? These two look the same to me..</p>