mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-04 16:41:19 +00:00
[netease:djradio] Use compat_itertools_count
This commit is contained in:
parent
a0e060ac1e
commit
4eab60cbd2
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,6 @@ from __future__ import unicode_literals
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import itertools
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
@ -12,6 +11,7 @@ from ..compat import (
|
||||||
compat_urllib_request,
|
compat_urllib_request,
|
||||||
compat_urllib_parse,
|
compat_urllib_parse,
|
||||||
compat_str,
|
compat_str,
|
||||||
|
compat_itertools_count,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ class NetEaseMusicDjRadioIE(NetEaseMusicBaseIE):
|
||||||
name = None
|
name = None
|
||||||
desc = None
|
desc = None
|
||||||
entries = []
|
entries = []
|
||||||
for offset in itertools.count(start=0, step=self._PAGE_SIZE):
|
for offset in compat_itertools_count(start=0, step=self._PAGE_SIZE):
|
||||||
info = self.query_api(
|
info = self.query_api(
|
||||||
'dj/program/byradio?asc=false&limit=%d&radioId=%s&offset=%d'
|
'dj/program/byradio?asc=false&limit=%d&radioId=%s&offset=%d'
|
||||||
% (self._PAGE_SIZE, dj_id, offset),
|
% (self._PAGE_SIZE, dj_id, offset),
|
||||||
|
|
Loading…
Reference in a new issue