Skip to content

Commit

Permalink
Merge pull request #18 from melvinchia3636/main
Browse files Browse the repository at this point in the history
changed `video_id` to `videoId`
  • Loading branch information
melvinchia3636 committed Mar 6, 2022
2 parents e2ff3ed + e491ee8 commit 914fa3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test.py → src/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from youtube_scraping_api import YoutubeAPI
api = YoutubeAPI()
print(api.search('mumbo jumbo')[0].raw)
print(api.search('mumbo jumbo')[0])
4 changes: 2 additions & 2 deletions src/youtube_scraping_api/parser/search_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def raw(self):

class PlaylistVideo:
def __init__(self, data):
self.id = data["video_id"]
self.id = data["videoId"]
self.title = data["title"]["simpleText"]
self.length = data["lengthText"]["simpleText"]

Expand Down Expand Up @@ -291,7 +291,7 @@ def raw(self):

RENDERER_PARSER = {
"videoRenderer": lambda x: Video(
x["video_id"],
x["videoId"],
title="".join(i["text"] for i in x["title"]["runs"]),
author=Channel(
name = x["ownerText"]["runs"][0]["text"],
Expand Down

0 comments on commit 914fa3f

Please sign in to comment.