Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage
Commits
0ebd6a37
Commit
0ebd6a37
authored
Apr 14, 2015
by
Fernando
Browse files
Options
Downloads
Patches
Plain Diff
Add user agent to RARBG
parent
df0a9870
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/providers/rarbg.py
+4
-2
4 additions, 2 deletions
sickbeard/providers/rarbg.py
with
4 additions
and
2 deletions
sickbeard/providers/rarbg.py
+
4
−
2
View file @
0ebd6a37
...
@@ -30,7 +30,7 @@ from lib import requests
...
@@ -30,7 +30,7 @@ from lib import requests
from
lib.requests
import
exceptions
from
lib.requests
import
exceptions
import
sickbeard
import
sickbeard
from
sickbeard.common
import
Quality
from
sickbeard.common
import
Quality
,
USER_AGENT
from
sickbeard
import
logger
from
sickbeard
import
logger
from
sickbeard
import
tvcache
from
sickbeard
import
tvcache
from
sickbeard
import
show_name_helpers
from
sickbeard
import
show_name_helpers
...
@@ -93,6 +93,8 @@ class RarbgProvider(generic.TorrentProvider):
...
@@ -93,6 +93,8 @@ class RarbgProvider(generic.TorrentProvider):
self
.
cache
=
RarbgCache
(
self
)
self
.
cache
=
RarbgCache
(
self
)
self
.
headers
=
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
'
User-Agent
'
:
USER_AGENT
}
def
isEnabled
(
self
):
def
isEnabled
(
self
):
return
self
.
enabled
return
self
.
enabled
...
@@ -107,7 +109,7 @@ class RarbgProvider(generic.TorrentProvider):
...
@@ -107,7 +109,7 @@ class RarbgProvider(generic.TorrentProvider):
resp_json
=
None
resp_json
=
None
try
:
try
:
response
=
self
.
session
.
get
(
self
.
urls
[
'
token
'
],
timeout
=
30
,
verify
=
False
)
response
=
self
.
session
.
get
(
self
.
urls
[
'
token
'
],
timeout
=
30
,
verify
=
False
,
headers
=
self
.
headers
)
response
.
raise_for_status
()
response
.
raise_for_status
()
resp_json
=
response
.
json
()
resp_json
=
response
.
json
()
except
RequestException
as
e
:
except
RequestException
as
e
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment