mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-09 10:33:59 +01:00
Rename PTH to Redacted and fix invalid User-Agent (Again)
This is a duplicate of albshin's PR as I got impatient waiting for him to submit it to the develop branch with the addition of removing the previous user agents and replacing them with Headphones as the agent. Redacted considers falsifying the agent as a bannable offence. From albshin's PR; "Changes all instances of PassTheHeadphones to Redacted. Removed the URL option for Redacted as it's unnecessary(?). Fixed a bug in the pyGazelle library in which the User-Agent was invalid due to a missing space. Should work now for Redacted."
This commit is contained in:
@@ -11,6 +11,7 @@ import sys
|
||||
import json
|
||||
import time
|
||||
import requests as requests
|
||||
import headphones
|
||||
|
||||
from .user import User
|
||||
from .artist import Artist
|
||||
@@ -32,9 +33,7 @@ class GazelleAPI(object):
|
||||
default_headers = {
|
||||
'Connection': 'keep-alive',
|
||||
'Cache-Control': 'max-age=0',
|
||||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3)'\
|
||||
'AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79'\
|
||||
'Safari/535.11',
|
||||
'User-Agent': 'Headphones/%s' % headphones.CURRENT_VERSION,
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9'\
|
||||
',*/*;q=0.8',
|
||||
'Accept-Encoding': 'gzip,deflate,sdch',
|
||||
|
||||
Reference in New Issue
Block a user