546200350 / TikTokUploder

Upload video to Tik Tok by sessionId
MIT License
170 stars 30 forks source link

Long error #48

Closed nahtan-dev closed 1 year ago

nahtan-dev commented 1 year ago

Hi, I'm getting those errors: `Traceback (most recent call last): File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn conn.connect() File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 363, in connect self.sock = conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000021AD576DED0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='fr.tiktok.com', port=443): Max retries exceeded with url: /upload/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000021AD576DED0>: Failed to establish a new connection: [Errno 11 001] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Nathan\Documents\RSL\index.py", line 259, in uploadVideo(session_id, file, title, tags, users, url_prefix) File "C:\Users\Nathan\Documents\RSL\uploader.py", line 15, in uploadVideo r = session.get(url,headers = headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Nathan\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='fr.tiktok.com', port=443): Max retries exceeded with url: /upload/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000021AD576DED0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) Here is my code: session_id = "533b414b12afdfce1dac569ca7a769e0" file = "video.mp4" tags = ["pourtoi", "histoire", "reddit", "fyp"] users = [] url_prefix = "fr"

uploadVideo(session_id, file, title, tags, users, url_prefix)`

nahtan-dev commented 1 year ago

oups sorry for the layout problem

XavierZambrano commented 1 year ago

The only url_prefix accepted are us and www, so use us or www

nahtan-dev commented 1 year ago

The only url_prefix accepted are us and www, so use us or www

Thanks! What's the difference between these two ?