Partially fix download speed throttle

This commit is contained in:
ritiek
2018-02-25 03:34:59 +05:30
parent c4bb047187
commit f943080edb

View File

@@ -9,6 +9,9 @@ import pprint
log = const.log
# Please respect this YouTube token :)
pafy.set_api_key('AIzaSyAnItl3udec-Q1d5bkjKJGL-RgrKO_vU90')
# Fix download speed throttle on short duration tracks
# Read more on mps-youtube/pafy#199
pafy.g.opener.addheaders.append(('Range', 'bytes=0-'))
def go_pafy(raw_song, meta_tags=None):