Skip to content

Commit

Permalink
Fix DMS parameters extraction
Browse files Browse the repository at this point in the history
Work continues in #174
  • Loading branch information
AlexAplin committed Aug 6, 2024
1 parent 9f8322a commit 7bffdce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nndownload/nndownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -1553,8 +1553,8 @@ def perform_api_request(session: requests.Session, document: BeautifulSoup) -> d

# .mp4 videos (HTML5)
# As of 2021, all videos are served this way
if document.find(id="js-initial-watch-data"):
params = json.loads(document.find(id="js-initial-watch-data")["data-api-data"])
if document.find("meta", {"name": "server-response"}):
params = json.loads(document.find("meta", {"name": "server-response"})["content"])["data"]["response"]

if params["video"]["isDeleted"]:
raise FormatNotAvailableException("Video was deleted")
Expand Down

0 comments on commit 7bffdce

Please sign in to comment.