Simple tool for tickets export with attachments

Hello all!
I wrote simple Python script that allows you save all tickets history
(including attachments) via REST API: https://github.com/ivsero/rt-dumper
It may be useful to someone :slight_smile:

Best regards,
Ivan Osipov

Hi Iā€™m trying to export all tickets from my RT witch your script
but i have an error, maybe you know what im doing wrong.

C:\Python27>python.exe rt_tickets_dumper.py --folder d:\RT_DUMP --domain rt.it.mydomain.pl --username AD\LOGIN --password ********* --schema https
Traceback (most recent call last):
  File "rt_tickets_dumper.py", line 133, in <module>
    schema = args.schema
  File "rt_tickets_dumper.py", line 26, in __init__
    self.cookies_dict = self._get_session_cookies()
  File "rt_tickets_dumper.py", line 31, in _get_session_cookies
    session.post(rt_auth_url, data='user={0}&pass={1}'.format(self.username, self.password))
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 555, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python27\lib\site-packages\requests\adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='rt.it.mydomain.pl', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),))