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
[Nebula] Extractor failed to obtain "id" #7017
Comments
If my understanding of nebula.py is correct (and it likely isn't), the issue is that that video's |
|
First problem is that there's a new API:
And the old link still works, but actually returns 404 for videos posted in the last 24h. The new API's reply is different, but the only important part is still there (manifest/m3u8). Second problem: there's no zype_id for the main video. You can pull it from another API call, but I don't think it's necessary (it's not actually the real video id, it was used just to please yt-dlp). If yt-dlp insists of having real ids, there actually are real video ids in Nebula (looks like "video_episode:8c2f6d8e-29ea-450f-bc16-51d896a2f59a" and is used in the API, like https://content.api.nebula.app/video_episodes/video_episode:8c2f6d8e-29ea-450f-bc16-51d896a2f59a/ - we might need to start using that API eventually). I'm removing the "video_episode:" part from the id in the patch, because it was getting mangled into ":" (also question marks in the titles are mangled into "?") when actually downloading. Trivial patch working for now: --- nebula.py@2023.03.04 2023-03-06 01:00:00.000000000 +0100
+++ nebula.py 2023-05-09 19:02:14.063160007 +0200
@@ -65,7 +65,7 @@
return response['token']
def _fetch_video_formats(self, slug):
- stream_info = self._call_nebula_api(f'https://content.watchnebula.com/video/{slug}/stream/',
+ stream_info = self._call_nebula_api(f'https://content.api.nebula.app/video/{slug}/stream/',
video_id=slug,
auth_type='bearer',
note='Fetching video stream info')
@@ -77,7 +77,7 @@
channel_slug = episode['channel_slug']
channel_title = episode['channel_title']
return {
- 'id': episode['zype_id'],
+ 'id': episode['id'].replace('video_episode:',''),
'display_id': episode['slug'],
'formats': fmts,
'subtitles': subs,
@@ -186,7 +186,7 @@
]
def _fetch_video_metadata(self, slug):
- return self._call_nebula_api(f'https://content.watchnebula.com/video/{slug}/',
+ return self._call_nebula_api(f'https://content.api.nebula.app/video/{slug}/',
video_id=slug,
auth_type='bearer',
note='Fetching video meta data') |
The original nebula extractor was using Zype and the id was kept for backward compatibility of archive. But if an additional request is needed just to fetch it, we can change it. @Lamieur Will you be fixing tests and opening a PR? |
I have no idea how to run the tests, As usual, I won't be making a PR :) I wonder though, is preserving the current id helpful to people? For example, if they're archiving videos automatically I'm asking because it's still possible to grab that id with a different API call, which for my needs is a waste of time, so I just changed it to the Nebula UUID for myself (it's ugly, but already there in the json), but if preserving video ids is valuable in some use cases, perhaps my 3-line patch is not that good :) |
Just dropping by to mention that I'm seeing the same issue here in the USA (unsurprisingly). |
I'm not a Python dev, so forgive me if I'm missing something, please. @Lamieur, could you actually make that a patch? |
Line 237 in ddae337
In theory, yes. But idk if anyone's actually using the feature with nebula. If additional API call is needed, imo it's best to not implement it rn and wait for someone to request support. |
Not sure of the significance. If you want my Nebula account detes, no problem. |
I don't know how useful this might be to you, but I'm able to download the streams manually. First, locate two network streams named media.m3u8 in the browser developer console network tab. One represents the video and the other one, the audio. Then, download them both using VLC's Open Network Stream >> Convert action, and multiplex them using ffmpeg. This is very annoying to do manually, but I'm pretty sure I can turn it into a script using VLC's command-line mode, or replacing VLC with ffmpeg again. Extracting the m3u8 URLs might be harder to automate. The thing I don't know how to do is extract the urls of the m3u8's from the page. Would I have to run an invisible browser instance to start the streams? EDIT: |
Any idea when the patch will be committed? I switched over to the nightly build, but it still won't work with Nebula. Barring that, can anyone give me a hint on how to make ffmpeg download no more than a certain resolution of the video? It's defaulting to the highest res, which makes the downloads pointlessly huge and very, very slow. As is its well-known Achilles' heel, ffmpeg has nearly unreadable documentation. Thanks. |
No idea what is the hold up for the patch, but for the size issue, you should be able to use the |
I hate to harass you, but ... "yt-dlp -F" reports
|
@CarlFink |
Thanks. It'll be interesting, because I think Nebula changed something else. The ffmpeg command I entered above stopped working today. |
I'm happy to report that it not only works perfectly, it seems to download an order of magnitude faster than the last release version that worked with Nebula. (I have no data, that's just my subjective impression.) I did not use aria2c. Thanks go to the entire yt-dlp team, to @Lamieur, to @rohieb, and to @bashonly. |
* fix up tests * keep zype_id as archive ID if it exists Original Patch by @Lamieur on issue yt-dlp#7017
Closes #7017 Authored by: Lamieur, rohieb Co-authored-by: Lam <github@Lam.pl>
It still fails and now it says "ERROR: 'NoneType' object has no attribute 'format'" |
@OracoloJanus that's due to an unrelated bug/regression in version |
Closes yt-dlp#7017 Authored by: Lamieur, rohieb Co-authored-by: Lam <github@Lam.pl>
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
UK
Provide a description that is worded well enough to be understood
I can still download older videos from Nebula, but recent videos from https://nebula.tv/videos/nothingbuttech-i-cloned-my-voice-to-expose-ai-drake on give an 'extractor failed to obtain "id"' error.
Please let me know if you require further information/login details.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: