Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can get the downloader to work on macOS #27

Open
JosephFM96 opened this issue Sep 19, 2023 · 8 comments
Open

Can get the downloader to work on macOS #27

JosephFM96 opened this issue Sep 19, 2023 · 8 comments

Comments

@JosephFM96
Copy link

Hi I've been trying and trying with the command python3 main.py -t and then the link and I can't get nothing... I would like to know how to exactly use the downlaoder pls if anyone could make a video working and successfully downloading something.. id like to get some videos with specific times now that I get a subscription active. So wonder if anyone could help with some snapshots of the process or any video it would be really appreciated it --Thx

@JosephFM96
Copy link
Author

JosephFM96 commented Sep 28, 2023

i don't know if im correct but I open a new term on the downloaded folder (my credentials are already changed on the file needed)

So then I write "python3 main.py -t and link and get nothing just warnings above:

--
raceback (most recent call last):
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 358, in connect
conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x103c28210>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/j/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cdn.watch.wwe.com', port=443): Max retries exceeded with url: /api/page?path=/https://network.wwe.com/video/117663/will-the-hardys-raw-tag-team-title-reign-be-reborn-by-fate-tonight-wwecom-2017-06-12 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103c28210>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/j/Downloads/WWE-Network-Downloader-master/main.py", line 113, in
video_link = account.get_video_info(EPISODE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/j/Downloads/WWE-Network-Downloader-master/wwe.py", line 131, in get_video_info
api_link = self._session.get(f'https://cdn.watch.wwe.com/api/page?path={link}').json()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/j/Library/Python/3.11/lib/python/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='cdn.watch.wwe.com', port=443): Max retries exceeded with url: /api/page?path=/https://network.wwe.com/video/117663/will-the-hardys-raw-tag-team-title-reign-be-reborn-by-fate-tonight-wwecom-2017-06-12 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103c28210>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))


@GabrielNagy
Copy link

Unfortunately the API used by the downloader seems to not be public anymore since they did some changes in the implementation a few months ago (kind of coinciding with the WWE Network interface revamp).

I think it can still be made to work if the information previously used from cdn.watch.wwe.com is pieced together from other sources, but this will require a bit of work.

@freyta
Copy link
Owner

freyta commented Oct 3, 2023

I've worked on it today finally, it's hard to do because Australia no longer uses the WWE Network, so I can only VPN to another country and download whatever is free.

I have a rudimentary version working with a glitch or two. You can no longer set a start time from the timestamp in the URL since that's removed from the network, but I decided to add a version where you will be able to set the time in the HH:MM:SS format like the Network gives you.

The status so far is:

Can log in
Can grab the show title and season / episode if it exist (not all have them?)
Downloads the audio (glitches some reason. Need to look into)
Downloads the video/subtitles and chapter information

Ideally I'd love to be able to make a GUI for it because that's always been my goal, I just never got around to it

@JosephFM96
Copy link
Author

I've worked on it today finally, it's hard to do because Australia no longer uses the WWE Network, so I can only VPN to another country and download whatever is free.

I have a rudimentary version working with a glitch or two. You can no longer set a start time from the timestamp in the URL since that's removed from the network, but I decided to add a version where you will be able to set the time in the HH:MM:SS format like the Network gives you.

The status so far is:

Can log in Can grab the show title and season / episode if it exist (not all have them?) Downloads the audio (glitches some reason. Need to look into) Downloads the video/subtitles and chapter information

Ideally I'd love to be able to make a GUI for it because that's always been my goal, I just never got around to it

Thanks A LOT for replying... look im a graphic designer and actually learning and studying some coding I can't assure you I can make a GUI but I am able to help you in whatever you need in case of graphics also like I see you're from AUS so need to vpn for could enter to WWEN so maybe I think that I could help you out in that way maybe getting you some vpn subscription for you that could work fine and at a good and reliable speed or maybe if I can do something from my place (Mexico) ill do it... I dunno nothing of python but I could try my best to or to learn or Help you out (now that I have access to the network and also an active subscription ) so PM if I can be in any help.. sincerely I thought you will not reply me or it'll be a long time for it but GREAT that you're still "active"

@MaxosHadj
Copy link

MaxosHadj commented Oct 23, 2023

I tried the new release and the video output is just only 6sec

py main.py -q 3 -t https://network.wwe.com/video/71963 -f
Succesfully logged in
Got the video information
aac files finished downloading0
ts files finished downloading0

Starting to write the metadata file

Starting to write the stream title
Finished writing the stream title

Finished writing the metadata file
ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mpegts, from 'temp/SmackDown - Jan. 06, 2005.ts':
  Duration: 00:00:06.00, start: 0.100000, bitrate: 4962 kb/s
  Program 1
  Stream #0:0[0x50]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn
[aac @ 0000024c6f180040] Estimating duration from bitrate, this may be inaccurate
Input #1, aac, from 'temp/SmackDown - Jan. 06, 2005.aac':
  Metadata:
    id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x1b\xa8
  Duration: 00:00:59.47, bitrate: 16 kb/s
  Stream #1:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 16 kb/s
Input #2, ffmetadata, from 'temp/SmackDown - Jan. 06, 2005-metafile':
  Metadata:
    title           : SmackDown - Jan. 06, 2005
  Duration: N/A, start: 0.000000, bitrate: N/A
Codec 0x21000 is not in the full list.
  Stream #2:0: Data: unknown_codec
    Metadata:
      title           : SmackDown - Jan. 06, 2005
Output #0, mp4, to 'output/SmackDown - Jan. 06, 2005/SmackDown - Jan. 06, 2005.mp4':
  Metadata:
    id3v2_priv.com.apple.streaming.transportStreamTimestamp: \x00\x00\x00\x00\x00\x00\x1b\xa8
    encoder         : Lavf60.3.100
  Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn
  Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 16 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  180 fps=0.0 q=-1.0 Lsize=    3663kB time=00:00:06.01 bitrate=4987.6kbits/s speed= 613x
video:3537kB audio:121kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.136534%
Traceback (most recent call last):
  File "C:\Users\WDAGUtilityAccount\t\main.py", line 224, in <module>
    database.db_upd(video_link[2], video_link[1], str(video_selections[0][0]), partial_download, int(time.time()))
  File "C:\Users\WDAGUtilityAccount\t\db_util.py", line 39, in db_upd
    self.c.execute(f"UPDATE downloads SET name = '{video_name}', quality = '{video_qual}', partial_download = '{partial}', date = '{timestamp}' WHERE id = {video_id}")
sqlite3.OperationalError: no such column: S6E1

@freyta
Copy link
Owner

freyta commented Oct 23, 2023

https://github.com/freyta/WWE-Network-Downloader/tree/freyta-patch-1

Try that branch. I edited the download_util.py so that the code to check if it's a partial download doesn't show there will be every segment downloaded. Hopefully it works.

@MaxosHadj
Copy link

MaxosHadj commented Oct 25, 2023

https://github.com/freyta/WWE-Network-Downloader/tree/freyta-patch-1

Try that branch. I edited the download_util.py so that the code to check if it's a partial download doesn't show there will be every segment downloaded. Hopefully it works.

It does work although I found another bug. I tried -q 2, the video starts 1920x1080 res and then after some mins turns to 1280x720 res.

@JosephFM96
Copy link
Author

@freyta just found myself with this.. you know what could be?
Captura de pantalla 2023-10-25 a la(s) 3 08 24 p m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants