Skip to content

Commit

Permalink
extractor: use util.log to print formatted text
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Jul 21, 2014
1 parent 07a224e commit cf3fce9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/you_get/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def extract(self, **kwargs):
def p_stream(self, stream_id):
stream = self.streams[stream_id]
if 'itag' in stream:
print(" - itag: \033[7m%s\033[0m" % stream_id)
print(" - itag: %s" % log.sprint(stream_id, log.NEGATIVE))
else:
print(" - format: \033[7m%s\033[0m" % stream_id)
print(" - format: %s" % log.sprint(stream_id, log.NEGATIVE))

if 'container' in stream:
print(" container: %s" % stream['container'])
Expand All @@ -93,9 +93,9 @@ def p_stream(self, stream_id):
print(" size: %s MiB (%s bytes)" % (round(stream['size'] / 1048576, 1), stream['size']))

if 'itag' in stream:
print(" # download-with: \033[4myou-get --itag=%s [URL]\033[0m" % stream_id)
print(" # download-with: %s" % log.sprint("you-get --itag=%s [URL]" % stream_id, log.UNDERLINE))
else:
print(" # download-with: \033[4myou-get --format=%s [URL]\033[0m" % stream_id)
print(" # download-with: %s" % log.sprint("you-get --format=%s [URL]" % stream_id, log.UNDERLINE))

print()

Expand Down

0 comments on commit cf3fce9

Please sign in to comment.