stackexchange-api

How to get a list of questions from stackoverflow API based on search query?

我与影子孤独终老i 提交于 2019-12-01 02:59:29
问题 I am interested in the getting a list of the question based on a tag or a search query. I will give you an example. So If I use the search keyword as "ipv4", it should give me a big list of questions related to ipv4. All I want to do is get the questions (title) as a list or an array so that I can do some processing on it. 回答1: You can get this information utilizing the questions/ route. In this call, you will pass the tag(s) you are interested in to the tagged parameter (separated by a

Unparseable StackExchange API response

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 01:22:44
问题 I've written a small program to analyze my profile data from the StackExchange API, but the api returns unparse-/unreadable data to me. Data received: (self downloaded using c#) \u001f�\b\0\0\0\0\0\u0004\0mRMo�0\f�/:�d$�c˱�'�^{/\u0006��\u0018G�>\I��\u0015���\u0004݀�D>�GR�L'���o��\u0004�G���%JP\u001c����-��Em>0���X�bm~�\u0018tk��\u0014�M]r�dLG�v0~Fj=���1\u00031I�>kTRA\"(/+.����;Nl\u0018�?h�\u0014��P藄�X�aL��w���#�3\u0002��+�\u007f���\u0010���\u000f�p�]��v\u007f���\t��ڧ�\nf��״\u0018\u0014eƺ�_�

Py-StackExchange filter by tag

夙愿已清 提交于 2019-11-30 23:12:36
I'm using Py-StackExchange to get a list of recent questions from Stack Overflow. I know there is a way to get just a constant list of questions: import stackexchange so = stackexchange.Site(stackexchange.StackOverflow) for question in so.questions(pagesize=10): print question But this returns all questions across SO. I'm wondering if there is a parameter to filter the questions list by tag, i.e. python , loops , etc to only return questions in that tag. I've been cruising the web for almost an hour searching for results, even reading through some of the scripts, but I can't find anything. Use

UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 34: ordinal not in range(128)

雨燕双飞 提交于 2019-11-29 15:59:11
问题 I have been working on a program to retrieve questions from stack overflow. Till yesterday the program was working fine, but since today I'm getting the error "Message File Name Line Position Traceback <module> C:\Users\DPT\Desktop\questions.py 13 UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 34: ordinal not in range(128)" Currently the Questions are being displayed but I seem to be unable to copy the output to a new text file. import sys sys.path.append('.')

Making JSON requests within Emacs

♀尐吖头ヾ 提交于 2019-11-29 00:22:54
问题 I am in the early stages of writing an Emacs major mode for browsing and contributing to sites on the Stack Exchange network, in much the same way as dired and list-packages works, with a few inspirations from magit and org-mode . The problem is, of course, I have no idea how I would interface Emacs with the SE API (v2.1) in the first place. I've never done anything that involves a network connection within Elisp, although I'm comfortable with the language itself (and have taken more than a

How to parse gzip encoded response with RestTemplate from Spring-Web

拜拜、爱过 提交于 2019-11-27 20:16:43
After I modified Consuming a RESTful Web Service example to call get users by id from api.stackexchange.com I get JsonParseException: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 31)): only regular white space (\r, \n, \t) is allowed between tokens Response from api.stackexchange.com is gzip compressed. How to add support for gzip compressed response into Spring-Web RestTemplate? I am using Spring boot parent ver. 1.3.1.RELEASE hence Spring-Web 4.2.4-RELEASE Here’s my adjusted example: User.java package stackexchange.dto; import com.fasterxml.jackson

Watching for new Mathematica questions using Mathematica and the StackOverflow API

人盡茶涼 提交于 2019-11-27 19:53:26
Unless Mr.Wizard is on vacation, it is pretty difficult to beat this phenomenon which seems to be gifted with omnipresence and omniscience. How can we outdo him using Mathematica and the StackOverflow API? Brett Champion Here's a variation on Sjoerd's solution. The main difference is to use a docked cell instead of a popup dialog. The cell has a link to the new post, as well as a button that will clear the docked cell to the previous state. The other difference is to use the question ID instead of the title for determining new posts. I know that titles get edited sometimes, so this trigger as

JSONP request returning error: “Uncaught SyntaxError: Unexpected token :”

醉酒当歌 提交于 2019-11-27 19:44:07
So I'm trying to make a request to the Stack Exchange API with the following jQuery code: $.ajax({ type: 'POST', url: 'http://api.stackoverflow.com/1.1/stats', dataType: 'jsonp', success: function() { console.log('Success!'); }, error: function() { console.log('Uh Oh!'); } }); But when I open the file on my machine, in either FireFox or Chrome, and make the request, I get this error: Resource interpreted as Script but transferred with MIME type application/json. Uncaught SyntaxError: Unexpected token : Uh Oh! I don't have a clue what's going on. I know the Stack Exchange API Gzips its

Encoding issue with requesting JSON from StackOverflow API

て烟熏妆下的殇ゞ 提交于 2019-11-27 07:57:07
问题 I can't figure this out for the life of me. Below is an implementation with the request module, but I've also tried with the node-XMLHttpRequest module to no avail. var request = require('request'); var url = 'http://api.stackexchange.com/2.1/questions?pagesize=100&fromdate=1356998400&todate=1359676800&order=desc&min=0&sort=votes&tagged=javascript&site=stackoverflow'; request.get({ url: url }, function(error, response, body) { if (error || response.statusCode !== 200) { console.log('There was

Watching for new Mathematica questions using Mathematica and the StackOverflow API

◇◆丶佛笑我妖孽 提交于 2019-11-26 22:53:00
问题 Unless Mr.Wizard is on vacation, it is pretty difficult to beat this phenomenon which seems to be gifted with omnipresence and omniscience. How can we outdo him using Mathematica and the StackOverflow API? 回答1: Here's a variation on Sjoerd's solution. The main difference is to use a docked cell instead of a popup dialog. The cell has a link to the new post, as well as a button that will clear the docked cell to the previous state. The other difference is to use the question ID instead of the