Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 17
Posts: 17   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3387 times and has 16 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Duplicated results in web API

HI,
please, are you using python to get your results from wcg ? if yes, are you using the wget/ curl command or the urllib.request ?
i tried the urllib.request option but i keep having the HTTP404 error ? do you have any idea about what can be the problem ?

thanks
[Dec 13, 2016 12:36:19 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Tullus
Cruncher
Joined: Nov 14, 2008
Post Count: 29
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Duplicated results in web API

I use the requests library with a url such as:
https://secure.worldcommunitygrid.org/api/members/tullus/results?
code=<code>&json=true&limit=25&offset=25
where tullus is my username and <code> is the "Verification Code", which used to be under worldcommunitygrid.org -> My Grid -> My Profile, but now I can't find it.
----------------------------------------
[Edit 1 times, last edit by Tullus at Dec 13, 2016 1:08:29 PM]
[Dec 13, 2016 1:06:51 PM]   Link   Report threatening or abusive post: please login first  Go to top 
adriverhoef
Master Cruncher
The Netherlands
Joined: Apr 3, 2009
Post Count: 2346
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Duplicated results in web API

I use the requests library with a url such as:
https://secure.worldcommunitygrid.org/api/members/tullus/results?
code=<code>&json=true&limit=25&offset=25
where tullus is my username and <code> is the "Verification Code", which used to be under worldcommunitygrid.org -> My Grid -> My Profile, but now I can't find it.

It's still there, and the other path can be of help, too: Help -> API ("verification code is found on the My Profile page of the member whose results data you wish to access"). On the My Profile page, look for "Verification Code:".
[Dec 13, 2016 1:29:29 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Duplicated results in web API

HI , thank you for the quick reply
the verification code is in settings> profile ( in the bottom of the page)
i'll use the requests to see if it works for me
[Dec 13, 2016 1:30:41 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Re: Duplicated results in web API

HI Tullus , please
which version of python are you using ?
do you import json in your code ?
[Dec 13, 2016 2:45:18 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Tullus
Cruncher
Joined: Nov 14, 2008
Post Count: 29
Status: Offline
Project Badges:
Reply to this Post  Reply with Quote 
Re: Duplicated results in web API

Hi dolli, I am using python 2.7, but python 3 should also be fine. Yes, since I pass json=true in the url I also import json and use the json.loads function.
Here is a minimal example:
import json
import requests

code =
user =
root = 'https://secure.worldcommunitygrid.org/api/members/'
url = root + '{user}/results?code={code}&json=true&limit=25&offset=25'.format(user=user,code=code)

r = requests.get(url)
content = r.content
dct = json.loads(content)
for res in dct['ResultsStatus']['Results']:
print res

[Dec 13, 2016 4:58:44 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
applause Re: Duplicated results in web API

Hey, thank you so much for your help , it finally worked for me biggrin
[Dec 14, 2016 1:40:29 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 17   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Post new Thread