title: Wikipedia API for python
body: <p>I am trying to see the table of contents in a wikipedia page using Wikipedia API for python. Here is my code.</p>
  
  <pre><code>&gt;&gt;&gt; import wikipedia
  &gt;&gt;&gt; ny = wikipedia.page("New York")
  &gt;&gt;&gt; ny.sections
  </code></pre>
  
  <p>But I am getting an empty list <code>[]</code> as the result. When I go to the page and check, I can see that there is content in the table of contents. All the other things said in the documentation seem to work except this. I am new to python coming from a java background.</p>