[08:12:55] https://thepasteb.in/p/k5hY8zDEpOrsE [11:09:16] Hello everyone ! Sorry for the previous message, I'm new and I didn't know how to correctly send a message. I'm working with the wikidata and I need some help please :) [11:14:19] Femuraille: guess you can ask what ever you need :} [11:14:26] and eventually one might see the message and reply [11:15:06] there is also a mailing list https://lists.wikimedia.org/mailman/listinfo/wikidata [11:15:25] would let you reach more people than on irc I believe [11:21:39] Ok so here I go [11:22:02] I'm working with wikidata since a few days. I 've succeed to get datas with the wikidata API by using jQuerryAjax. But now I try to contribute some datas with ajax too. I heard I need to create a token so I try to get one threw this little ajax call : [11:22:22] $.ajax({ [11:22:22] url:"https://www.wikidata.org/w/api.php?action=query&meta=tokens&format=json", [11:22:22] type:"POST", [11:22:22] dataType: "jsonp", [11:22:22] contentType: "application/json;", [11:22:22] crossDomain: true, [11:22:22] [11:22:23] success: function(data) [11:22:23] { [11:22:24] console.log('We enter in the success'); [11:22:24] console.dir(data); [11:22:25] mydata = data; [11:22:46] And I get an object : warnings.token.* "Tokens may not be obtained when the same-origin policy is not applied. [11:24:54] In fact I'm asking myself if I have to regenerate a token for each edit I want to make or get a token only one time and use it all the time for editing [11:31:47] Femuraille: You should use a pastebin for these kind of things. For each edit you get a token [11:35:05] https://www.wikidata.org/w/api.php?action=help&recursivesubmodules=1 is quite useful and https://www.mediawiki.org/wiki/Manual:Edit_token describes the tokens [11:49:29] Thank's but I've already read those two pages and I didn't find a way to fix my problem :/ [11:50:21] hi, if i have a few thousand wikidata items, is there a tool somewhere to get "instance of" for all of them? Downloading the whole db seems an overkill [11:57:53] I think you can do a thing like that using Widata query service (with SPARQL) [12:05:31] Femuraille, i don't think it will take thousands of VALUE { ... } constants :) [12:15:23] :win go #nasqueron [12:15:30] irssi ... [12:16:03] I have to necessarily apply the same-origin policy if I want to get a token via AJAX ? [12:42:18] yurik: I doubt there's anything which will work in a single query unless you can find a sparql query to return the items you want info about. I would just split it into small enough batches and do multiple queries, you can still combine enough items to make it faster than querying items one by one [12:42:39] and hopefully https://phabricator.wikimedia.org/T125299 and https://phabricator.wikimedia.org/T112151 will be done sometime soon [20:56:33] Should Q937 (Albert Einstein) be semiprotected? [20:56:37] https://www.wikidata.org/w/index.php?title=Q937&action=history [21:47:59] $300 up for grabs if you implement Wikidata reconciliation in OpenRefine https://www.bountysource.com/issues/985941 :) [21:53:16] do you really need JS to show simple text, bountysource? [23:08:04] DanielK_WMDE_, is there an easy way to get "instance of" property for a set of 300k subjects? [23:08:20] i would prefer not to download the whole dump of course [23:09:19] cc: SMalyshev [23:19:57] I still think it would be easiest to just fetch them in batches [23:20:27] it would certainly be quicker :P [23:22:32] nikki, right, but is there an easy python or other script to simplify it? [23:22:38] i don't want to write it from scratch :) [23:23:06] even if it uses sparql, it would be ~1200 queries [23:40:32] yurik: I'm going to bed now, if you don't find anything and don't want to do it yourself, give me a link to the list and I'll see what I can do in the morning [23:41:07] nikki, thanks, but, i need a script for my later work anyway :) I need to cross-check OSM with WD