Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

Serel and pilha are good Ruby wrappers for the StackExchange API, but I am not able to access the body method for question and answers. The body method returns nil.

I want the content of questions and answers. How can I get them?

Also I have used Nokogiri to extract content, but sometimes I get an "internal error 500". Why is this so? Do they block the scraper #Nokogiri after some attempts?

share|improve this question
    
For the record, Nokogiri isn't a scraper, it's an XML/HTML parser. –  Greg Jun 26 '13 at 23:34
add comment

1 Answer

Although I don't use Ruby (and consequently have not used the two libraries you've mentioned), I'm going to guess that the problem is that you aren't specifying a filter that includes body.

By default, post body is not included in the JSON returned by API methods and must explicitly be requested by creating a filter that includes it. The withbody filter, for example, would include body in the response.

You will likely want to consult the documentation for each library for instructions on setting a filter.

share|improve this answer
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .