Mincka / DMArchiver

A tool to archive the direct messages, images and videos from your private conversations on Twitter
GNU General Public License v3.0
223 stars 25 forks source link

how can to set proxy setting? #33

Closed zoghal closed 5 years ago

zoghal commented 7 years ago

Hello When running gives me this error i think to need set proxy server setting for https connection (in iran https is blocked) Is it possible to define a new parameter in the command line t set proxy settings? thnaks

E:\tww>dmarchiver.exe
DMArchiver 0.1.7
Running on Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)]

Enter your username or email: zoghal
Enter your password (characters will not be displayed):
Traceback (most recent call last):
  File "site-packages\requests\packages\urllib3\connection.py", line 142, in _new_conn
  File "site-packages\requests\packages\urllib3\util\connection.py", line 98, in create_connection
  File "site-packages\requests\packages\urllib3\util\connection.py", line 88, in create_connection
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 352, in _make_request
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 831, in _validate_conn
  File "site-packages\requests\packages\urllib3\connection.py", line 254, in connect
  File "site-packages\requests\packages\urllib3\connection.py", line 151, in _new_conn
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02DB23D0>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 423, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 640, in urlopen
  File "site-packages\requests\packages\urllib3\util\retry.py", line 287, in increment
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='twitter.com', port=443): Max retries exceeded with url: /login (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02DB23D0>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "dmarchiver\cmdline.py", line 107, in <module>
  File "dmarchiver\cmdline.py", line 75, in main
  File "dmarchiver\core.py", line 270, in authenticate
  File "site-packages\requests\sessions.py", line 488, in get
  File "site-packages\requests\sessions.py", line 475, in request
  File "site-packages\requests\sessions.py", line 596, in send
  File "site-packages\requests\adapters.py", line 487, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='twitter.com', port=443): Max retries exceeded with url: /login (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02DB23D0>: Failed to establish a new connection: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions',))
Failed to execute script cmdline
Mincka commented 5 years ago

Built-in support for proxy is not planned. Maybe you can look at environment variables (https://stackoverflow.com/questions/31639742/how-to-pass-all-pythons-traffics-through-a-http-proxy) or use redsocks (https://github.com/darkk/redsocks)