mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
从 TMDB 相对链接中解析数值 ID。
This commit is contained in:
@@ -404,10 +404,7 @@ class TmdbApi:
|
|||||||
return int(match.group(1))
|
return int(match.group(1))
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
# 兜底:取最后段再取数字前缀
|
return None
|
||||||
last = link.rsplit("/", 1)[-1]
|
|
||||||
num_match = re.match(r"^(\d+)", last)
|
|
||||||
return int(num_match.group(1)) if num_match else None
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __get_names(tmdb_info: dict) -> List[str]:
|
def __get_names(tmdb_info: dict) -> List[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user