Hi folks.
*This is my first time using this mail list*, so if this is not the right
place to ask this kind of question please lemme know about how I should
proceed in this case.
*Question*
I have basically downloaded from MediaWiki API a lot of pages related to
mathematics. Some of them are just *duplicated of the same Article*, but
with one difference being their title, such as different way os calling the
same subject, or letter that differs from one and another, ao so on and so
forth.
One example that I can show you right away is:
- "Adição_de_*s*egmentos", and
- "Adição_de_*S*egmentos",
both written in portuguese (my native language). The only difference
between the titles are just the lowercase and uppercase of the letter
"s".As I was testing on the URL's, it seems that *they both are the same
article, but redirecting from different links to the official "title".*
Keeping in mind those kind of duplicates, when I've started *to analyse the
statistics of views on a specific article*, while going through its cases,
I was expecting to receive the following structure of data:
- The old ones (deprecated) would hold views until some day X, and then
it would have nothing to further count and show;
- The up-to-date titles would have data starting from day X and then
would hold until the last day that I want to analyse.
Nothing too crazy to expect from the database. But that was not what
happened. *There are plenty of articles that are still receiving views even
though they all redirect to another article*. At first, I've just thought
that people are getting to the articles's content with different links
available on search engines, such as google, so all views must be
independent from one another. The problem is, after testing on the google
platform different search for *the same Wikipedia's article I can only get
the* *up-to-date articles, not the old ones.*
1. How can this be possible?
2. But more important for me, are all acesses on the deprecated articles
made by bots or old links available on old pages from other sites?
3. Are the count on all different article's title independent?
4. If so, how could I be able to even track all the possible acesses on
a particular subject to create an effective study o it?
Anyway, this is (if I remember well) the fourth time I'm trying to get a
proper answer for my question, and I'm hopping I'll get it soon.
Thanks!
Marco Antonio
Graduando em Matemática Pura na USP | Divulgador Científico
<https://www.facebook.com/ViaSaber> <https://www.linkedin.com/in/magcastro/>
<https://www.instagram.com/marcoantoniograziano/>
The error codes that may be changing are some of those representing invalid
values for API parameters. Notably, the following will change:
- "noX", indicating that a required parameter was not specified, becomes
"missingparam".
- "unknown_X", indicating that an unrecognized value was specified for
an enumerated-value parameter, becomes "badvalue".
- "too-many-X", indicating that too many values were supplied to a
multi-valued parameter, becomes "toomanyvalues".
- "baduser_X", "badtimestamp_X", and so on become "baduser",
"badtimestamp", and so on.
Note this is not a comprehensive list, other codes may be changing as well.
These changes make the error codes more predictable, at the expense of not
indicating in the code which parameter specifically triggered the error. If
you have a use case where knowing which parameter triggered the error is
needed, please let us know (by replying to this message or by filing a
request in Phabricator) and we'll add the necessary error metadata.
The human-readable text is also changing for some of these errors (with or
without error code changes), and for a few the error metadata may be
changing (e.g. "botMax" changes to "highmax" for limit-type warnings in
non-back-compat error formats).
This change will most likely go out to Wikimedia wikis with 1.35.0-wmf.19.
See https://www.mediawiki.org/wiki/MediaWiki_1.35/Roadmap for a schedule.
--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
Various unusual values for integer-type parameters to the Action API will
no longer be accepted. Acceptable values will consist of an optional sign
(ASCII `+` or `-`) followed by 1 or more ASCII digits.
Values that were formerly allowed, and will now result in a "badinteger"
error, include:
- Values with extraneous whitespace, such as " 1".
- "1.9", formerly interpreted as "1".
- "1e1", formerly interpreted as either "1" or "10" at various times.
- "1foobar", formerly interpreted as "1"
- "foobar", formerly interpreted as "0".
Most clients should already be using correct formats, unless they are
taking direct user input without validation.
This change will most likely go out to Wikimedia wikis with 1.35.0-wmf.19.
See https://www.mediawiki.org/wiki/MediaWiki_1.35/Roadmap for a schedule.
--
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Mediawiki-api-announce mailing list
Mediawiki-api-announce(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce
I posted the topic below at
https://www.mediawiki.org/wiki/Extension_talk:ReadingLists and was
hoping for some feedback
> I'm trying to use the readinglists setup command and running in to a
> permission denied message.
>
> I think the problem is that my bot does not have editmyprivateinfo
> enabled.
>
Now that I think about it, it looks like Special:BotPasswords requires
editmyprivateinfo be set by the user before a bot password is created.
If a bot had this permission, then it could set its own password, which
might be bad. This suggests that perhaps the ReadingList functionality
should use a different permission?
>
> Below are the details.
>
> This is a bit of a newbie question as I'm just starting out with the
> api. Please forgive me if this is not the right place to start this
> discussion. I considered adding something to Phabricator, but this
> issue is more of a user problem then a problem with the software.
>
> Anyway...
>
> I have a test program where I get a login token, login, get a csrf
> token and then call setup.
>
> #!/opt/local/bin/python3
>
> """
> setup.py
>
> Invoke the readinglists setup command
>
> MIT License
>
> """
>
> import requests
>
> URL = "https://en.wikipedia.org/w/api.php"
> #URL = "https://www.mediawiki.org/w/api.php"
>
> S = requests.Session()
>
> # Retrieve login token first
> PARAMS_LOGIN_TOKEN = {
> 'action':"query",
> 'meta':"tokens",
> 'type':"login",
> 'format':"json"
> }
>
> R = S.get(url=URL, params=PARAMS_LOGIN_TOKEN)
> DATA = R.json()
>
> LOGIN_TOKEN = DATA['query']['tokens']['logintoken']
>
> print("Got logintoken")
>
> # Send a post request to login. Using the main account for login is not
> # supported. Obtain credentials via Special:BotPasswords
> # (https://www.mediawiki.org/wiki/Special:BotPasswords) for lgname &
> lgpassword
>
> PARAMS_LOGIN = {
> 'action':"login",
> 'lgname': BOT_NAME_HERE,
> 'lgpassword': BOT_PASSWORD_HERE,
> 'lgtoken':LOGIN_TOKEN,
> 'format':"json"
> }
>
> R = S.post(URL, data=PARAMS_LOGIN)
> DATA = R.json()
>
> print("After login")
> print(DATA)
>
> # GET the CSRF Token
> PARAMS_CSRF = {
> "action": "query",
> "meta": "tokens",
> "format": "json"
> }
>
> R = S.get(url=URL, params=PARAMS_CSRF)
> DATA = R.json()
>
> CSRF_TOKEN = DATA['query']['tokens']['csrftoken']
>
> # Call setup
> PARAMS_SETUP = {
> "action": "readinglists",
> "command": "setup",
> "format": "json",
> "token": CSRF_TOKEN
> }
>
> print("About to setup")
> R = S.post(URL, data=PARAMS_SETUP)
> print("After attempting to call setup")
> print(R)
> print(R.text)
>
>
>
> The message I get is:
>
> |bash-3.2$ ./setup.py
> Got logintoken
> After login
> {'login': {'result': 'Success', 'lguserid': 208882, 'lgusername':
> 'Cxbrx'}}
> About to setup
> After attempting to call setup
> <Response [200]>
> {"error":{"code":"permissiondenied","info":"You don't have permission
> to edit your private information.","*":"See
> https://en.wikipedia.org/w/api.php for API usage. Subscribe to the
> mediawiki-api-announce mailing list at
> <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce>
> for notice of API deprecations and breaking
> changes."},"servedby":"mw1316"}
> bash-3.2$ |
>
> In a separate script, I'm able to retrieve my readinglists, so I know
> that logging in is working.
>
> I think the problem is that my bot does not have editmyprivateinfo
> enabled.
>
> Looking at the code, I can see ApiReadingLists.php at
> https://github.com/wikimedia/mediawiki-extensions-ReadingLists/blob/869ffc5…
> checks for editmyprivateinfo
>
> Does anyone know if editmyprivateinfo is the problem? If so, is it
> possible to enable it for a bot?
>
_Christopher
Hello. I would like to learn if this possible
For example lets say the article gelmek
here the link https://en.wiktionary.org/wiki/gelmek
On that page it has conjugations
When we click edit, we see that it has the following template/module
{{tr-conj|gel|e|gelir|i|d}}
So can i parse this?
Like i provide the page id and this template to get the parsed results via
api?
Or any other way?
e.g.
https://en.wiktionary.org/w/api.php?action=query&titles=gelmek&parseTemplat…
Dear friends,
We have been working for some months in a wikidata project, and we have found an issue with edition performance, I began to work with wikidata java api, and when I tried to increase the edition speed the java system held editions, and inserted delays, which reduced edition output as well.
I chose the option to edit with pywikibot, but my experience was that this reduced more the edition.
At the end we use the procedure indicated here:
https://www.mediawiki.org/wiki/API:Edit#Example
With multithreading, and we reach a maximum of 10,6 edition per second.
my questions is if there is some experience when has been possible to have a higher speed?.
Currently we need to write 1.500.000 items, and we would require 5 working days for such a task.
Best regards
Luis Ramos
Senior Java Developer
(Semantic Web Developer)
PST.AG
Jena, Germany.
Hello,
in 2016 I wrote a small Android app, that is making use of the Wikipedia ActionApi to search for articles at the current location of a user.
Due to legal considerations I am currently trying to take down the app.
It’s not available any more in the Google PlayStore, but there are still installations out there.
That’s why I want to make these installations unusable by deactivating all backend services, that the app is using.
Unfortunately the app is (partially) directly communicating with wikipedia servers and not via a proxy under my control.
The app sends a special User-Agent HTTP header with every request to identify itself:
tagorama/v1.0.0.283-release (http://tagorama.rocks/ <http://tagorama.rocks/>; info(a)tagorama.rocks <mailto:info@tagorama.rocks>)
Is there any way for you to block requests from this app?
Who would I contact?
Thanks for your help,
Frank Wunderlich