-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make downloading async for background tasks to run (#15)
* turn the download interphase to an async method also change it to a class method instead of a static one, because we may want to use other class methods. (refactor foreshadowing) * make `YoutubeDownloader` async * add download methods for usage by subclasses This will make async downloads a lot easier if the library gives the download links directly or I webscrape them out * make `InstagramDownloader` async and refactor Had to use `asyncio.to_thread` due to downloading videos using a library just like `YoutubeDownloader` * make `TwitterDownload` async and refactor Used the super classes download methods to download the files. * get rid of twitter helpers * use await on download commands due to async change * turn download tests to async * make sure the path exists before downloading in `downloader.py` THE TESTS FINALLY COUGHT A BUG LESSGOOO!!!
- Loading branch information
Showing
11 changed files
with
154 additions
and
133 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
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
testpaths = | ||
Tests | ||
pythonpath = . | ||
asyncio_mode = auto |
This file was deleted.
Oops, something went wrong.
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
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.