diff --git a/pytube/__main__.py b/pytube/__main__.py index cf76e0659..06b815f94 100644 --- a/pytube/__main__.py +++ b/pytube/__main__.py @@ -109,7 +109,8 @@ def init(self): self.player_config_args = self.vid_info else: self.player_config_args = extract.get_ytplayer_config( - self.watch_html)['args'] + self.watch_html, + )['args'] # https://github.com/nficano/pytube/issues/165 stream_maps = ['url_encoded_fmt_stream_map'] @@ -152,7 +153,7 @@ def prefetch(self): watch_url=self.watch_url, watch_html=self.watch_html, embed_html=self.embed_html, - age_restricted=self.age_restricted + age_restricted=self.age_restricted, ) self.vid_info = request.get(self.vid_info_url) if not self.age_restricted: diff --git a/pytube/extract.py b/pytube/extract.py index 0eaa163ba..d6d635d6e 100644 --- a/pytube/extract.py +++ b/pytube/extract.py @@ -63,8 +63,10 @@ def eurl(video_id): return 'https://youtube.googleapis.com/v/{}'.format(video_id) -def video_info_url(video_id, watch_url, watch_html, embed_html, - age_restricted): +def video_info_url( + video_id, watch_url, watch_html, embed_html, + age_restricted, +): """Construct the video_info url. :param str video_id: @@ -94,8 +96,10 @@ def video_info_url(video_id, watch_url, watch_html, embed_html, else: # I'm not entirely sure what ``t`` represents. Looks to represent a # boolean. - t = regex_search(r'\W[\'"]?t[\'"]?: ?[\'"](.+?)[\'"]', watch_html, - group=0) + t = regex_search( + r'\W[\'"]?t[\'"]?: ?[\'"](.+?)[\'"]', watch_html, + group=0, + ) params = OrderedDict([ ('video_id', video_id), ('el', '$el'), diff --git a/setup.cfg b/setup.cfg index 4d9f912d7..c1de123af 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ commit = True tag = True current_version = 8.0.3 parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\-(?P[a-z]+))? -serialize = +serialize = {major}.{minor}.{patch} [metadata] @@ -15,6 +15,5 @@ description-file = README.md [coverage:run] source = pytube -omit = +omit = pytube/compat.py -