Compare commits
No commits in common. "8a03b7b324c096bc83198219762f9cd1517c3663" and "f372e279787e8923dc93f72115c5db9d30d92f66" have entirely different histories.
8a03b7b324
...
f372e27978
@ -109,7 +109,6 @@ class NBLA(Service):
|
||||
|
||||
VIDEO_RE = r"https?://(?:www\.)?nebula\.tv/videos/(?P<slug>.+)"
|
||||
CHANNEL_RE = r"^https?://(?:www\.)?nebula\.tv/(?P<slug>.+)"
|
||||
EPISODE_LABEL_RE = re.compile("^Episode ([0-9]+)$")
|
||||
|
||||
@staticmethod
|
||||
@click.command(name="NBLA", short_help="https://nebula.tv", help=__doc__)
|
||||
@ -199,8 +198,9 @@ class NBLA(Service):
|
||||
def get_chapters(self, title: Union[Episode, Movie]) -> list[Chapter]:
|
||||
return []
|
||||
|
||||
|
||||
def search(self) -> Generator[SearchResult, None, None]:
|
||||
return
|
||||
pass
|
||||
#self.title
|
||||
r = self.session.get(self.config["endpoints"]["search"], params=params)
|
||||
r.raise_for_status()
|
||||
@ -226,19 +226,12 @@ class NBLA(Service):
|
||||
# Specials episode numbers will then likely be off, use caution and
|
||||
# check TMDB for manual corrections.
|
||||
season_number = 0
|
||||
self.log.warn(f"Could not extract season information from {season['label']}, guessing season {season_number}")
|
||||
self.log.warn(f"Could not extract season information, guessing season {season_number}")
|
||||
|
||||
for episode_number, episode in enumerate(season["episodes"], start=1):
|
||||
if not episode["video"] or (video_id_filter and video_id_filter != episode["video"]["id"]):
|
||||
continue
|
||||
|
||||
# Episodic content usually has a label like "Episode 1". Try to use that to
|
||||
# fetch the episode number. Alternatively, fall back to just the enumerated
|
||||
# numbers (these usually work well enough, but sometimes content is listed
|
||||
# in reverse order)
|
||||
if match := self.EPISODE_LABEL_RE.match(episode['label']):
|
||||
episode_number = int(match.group(1))
|
||||
|
||||
yield Episode(
|
||||
id_=episode["video"]["id"],
|
||||
service=self.__class__,
|
||||
@ -249,6 +242,8 @@ class NBLA(Service):
|
||||
number=episode_number,
|
||||
)
|
||||
|
||||
|
||||
|
||||
def get_content(self, slug, video_id_filter=None):
|
||||
r = self.session.get(self.config["endpoints"]["content"].format(slug=slug))
|
||||
content = r.json()
|
||||
|
||||
@ -10,4 +10,4 @@ endpoints:
|
||||
video: https://content.api.nebula.app/content/videos/{slug}/
|
||||
video_channel: https://content.api.nebula.app/video_channels/{id}/
|
||||
video_channel_episodes: https://content.api.nebula.app/video_channels/{id}/video_episodes/?ordering=published_at
|
||||
manifest: https://content.api.nebula.app/video_episodes/{video_id}/manifest.m3u8?token={jwt}&app_version=26.4.0&platform=web&all_manifest=true
|
||||
manifest: https://content.api.nebula.app/video_episodes/{video_id}/manifest.m3u8?token={jwt}&app_version=26.2.0&platform=web&all_manifest=true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user