Xqt added a comment.

  Unfortunately this is not trival. There are several placed where UA are used 
or can be modified:
  
  comms Module
  ------------
  
  **eventstreams** uses `http.user_agent(site)` but the header can be overridden
  **http.request** uses `http.user_agent(site)` but the format string can be 
overridden with a string passed to headers dict. `http.request` calls 
http.fetch to proceed.
  **http.fetch** may have an UA depending on `use_fake_user_agent` parameter 
passed with this function or the `config.use_fake_user_agent_exception` and 
`config.use_fake_user_agent` settings, the direct headers dict settings.
  
  version Script
  --------------
  
  Uses `'{pwb}'` as format string for gerrit request which is replaced py 
`'Pywikibot/' + pywikibot.__version__`
  
  Other Scripts
  -------------
  
  `reflinks` and `weblinkchecker` may use a fake user agent if 
`config.fake_user_agent_default` is set for the given script
  
  Conclusion
  ----------
  
  All we can show with `version.py` is the default UA for the default `Site()`.

TASK DETAIL
  https://phabricator.wikimedia.org/T406458

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to