@hook.on_start
def set_headers(bot):
 global headers
 headers = {'User-Agent': bot.user_agent}

@ hook . on_start def set_headers ( bot ) : global headers headers = { 'User-Agent' : bot . user_agent }
runs on initial plugin load and sets the http headers for this plugin .