-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
youtube-transcript-api
library
Replace the third-party `youtube-transcript-api` library with our own code for getting transcripts from YouTube.
- Loading branch information
Showing
9 changed files
with
525 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from tests.factories.transcript import TranscriptFactory | ||
from tests.factories.transcript_info import TranscriptInfoFactory | ||
from tests.factories.video import VideoFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from factory import Factory, Sequence | ||
|
||
from via.services.youtube_transcript import TranscriptInfo | ||
|
||
|
||
class TranscriptInfoFactory(Factory): | ||
class Meta: | ||
model = TranscriptInfo | ||
|
||
language_code = "en-us" | ||
name = "English (United States)" | ||
url = Sequence(lambda n: f"https://example.com/api/timedtext?v={n}") | ||
autogenerated = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.