Update config.user_agent_format to be compliant with WM Foundation UA Policy. This requires to provide either an email or a specific url for the bot.
See also:
Update config.user_agent_format to be compliant with WM Foundation UA Policy. This requires to provide either an email or a specific url for the bot.
See also:
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | BUG REPORT | Xqt | T414170 All Github actions tests fails due to 429 status code | ||
| Resolved | Fabfur | T414173 All github action tests of Pywikibot fails due to 429 status code (TOO MANY REQUESTS) | |||
| Resolved | Feature | Xqt | T414201 Update config.user_agent_format to be compliant with WM Foundation UA Policy |
I asked AI and changed pywikipot/comms/http.py :
replace
if site:
script_comments.append(str(site))with
if site:
script_comments.append(
f'{site.protocol()}://{site.hostname()}'
)and no more problem with 429 status
Hi @JAnD, thank you for this proposal. I think it will be implemented in such a way, but I still get this 429 issue even with a fixed UA, fixed URL, and email, and even after adding a mindelay. The old Pywikibot UA should match for the most wikis after this string. Obviously there is a newly introduced limit for API access except bots running on Toolforge even the bot is registered and has a bot flag.
It’s extremely frustrating and time-consuming to constantly chase all those upstream changes at the moment and at a time I was going to publish Pywikibot 11.
The user name is always required in UA as User:<username> but sometimes it is missing. This can happen if there is no username given within user-config.py, maybe also for wildcard usage. For Pywikibot tests the environment variable can be used.
Change #1226297 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] IMPR: Use environment variables is usernames aren't within config.py
Change #1226297 merged by jenkins-bot:
[pywikibot/core@master] IMPR: Use environment variables is usernames aren't within config.py
Change #1235310 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] UA: Replace "family", "code", and "lang" in user_agent format string
Change #1235310 merged by jenkins-bot:
[pywikibot/core@master] UA: Cleanup UA format string
Change #1237694 had a related patch set uploaded (by Xqt; author: Xqt):
[pywikibot/core@master] UA: use URL to user page in user agent
Change #1237694 merged by jenkins-bot:
[pywikibot/core@master] UA: use URL to user page in user agent