Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUE-64 support last updated date for kinozal && skip download if mi…
…ssing update
- Loading branch information
Showing
8 changed files
with
477 additions
and
15 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from datetime import datetime | ||
from torrt.trackers.kinozal import KinozalTracker | ||
|
||
|
||
def test_get_torrent(response_mock, datafix_read, datafix_dir): | ||
|
||
tracker = KinozalTracker() | ||
tracker.raise_on_error_response = True | ||
|
||
test_torrent = (datafix_dir / 'test.torrent').read_bytes() | ||
|
||
with response_mock([ | ||
f"GET https://kinozal.me/details.php?id=557593 -> 200: {datafix_read('kinozal.html', encoding='windows-1251')}", | ||
b"GET https://kinozal.me/download.php?id=557593 -> 200:" + test_torrent, | ||
|
||
]) as _: | ||
torr = tracker.get_torrent('https://kinozal.me/details.php?id=557593', datetime(2015, 4, 16)) | ||
assert torr.hash == 'c815be93f20bf8b12fed14bee35c14b19b1d1984' | ||
assert torr.url == 'https://kinozal.me/details.php?id=557593' | ||
assert torr.url_file == 'https://dl.kinozal.me/download.php?id=557593' | ||
assert torr.parsed.comment == 'примечание' | ||
assert torr.page.date_updated == datetime(2015, 5, 16, 18, 0) | ||
assert torr.page.title == 'Властелин колец (Трилогия) (Смешной перевод Гоблина) / The Lord of the Rings. Trilogy / 2001-2003 / АП (Пучков) / DVDRip :: Кинозал.МЕ' |
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
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