Dargasea added a comment. |
In T152075#2837739, @jayvdb wrote:i.e. we would add a use_fake_user_agent parameter to methods in http.comms, which is False by default, True forces a fake user-agent, and None means automatic use of fallback logic (use fake if in the config list, otherwise try with real user-agent, and fallback to fake).
http.comms seems to be used only to get the user_agent, but not for making the requests themselves. Shouldn't this parameter and logic be implemented in the scripts that need fake UAs (i.e. reflinks and weblinkchecker) instead?
It would also be nice if the config list allowed literal strings: when connecting to this server, use this user-agent, rather than a random one.
Yup. This list would also be better if it is dynamically updated, instead of hard-coded in config2.py, so maybe we should put this on a WikiTech page. This make user-agent specifications like this less messy as well.
Cc: jayvdb, Aklapper, TerraCodes, pywikibot-bugs-list, Dargasea, Magul, MayS, Mdupont, JJMC89, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs