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