Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
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-1
Commits
e83663ba
Commit
e83663ba
authored
Sep 7, 2015
by
Dustyn Gibson
Browse files
Options
Downloads
Patches
Plain Diff
Try to fix SiCKRAGETV/sickrage-issues/issues/2568
parent
b4072f4b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sickbeard/helpers.py
+4
-0
4 additions, 0 deletions
sickbeard/helpers.py
sickbeard/providers/torrentleech.py
+1
-4
1 addition, 4 deletions
sickbeard/providers/torrentleech.py
with
5 additions
and
4 deletions
sickbeard/helpers.py
+
4
−
0
View file @
e83663ba
...
@@ -1361,6 +1361,10 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
...
@@ -1361,6 +1361,10 @@ def getURL(url, post_data=None, params={}, headers={}, timeout=30, session=None,
try
:
try
:
# decide if we get or post data to server
# decide if we get or post data to server
if
post_data
:
if
post_data
:
for
param
in
post_data
:
if
isinstance
(
post_data
[
param
],
unicode
):
post_data
[
param
]
=
post_data
[
param
].
encode
(
'
utf-8
'
)
session
.
headers
.
update
({
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
})
session
.
headers
.
update
({
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
})
resp
=
session
.
post
(
url
,
data
=
post_data
,
timeout
=
timeout
,
allow_redirects
=
True
,
verify
=
session
.
verify
)
resp
=
session
.
post
(
url
,
data
=
post_data
,
timeout
=
timeout
,
allow_redirects
=
True
,
verify
=
session
.
verify
)
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
sickbeard/providers/torrentleech.py
+
1
−
4
View file @
e83663ba
...
@@ -31,7 +31,6 @@ from sickbeard import classes
...
@@ -31,7 +31,6 @@ from sickbeard import classes
from
sickbeard
import
helpers
from
sickbeard
import
helpers
from
sickbeard
import
show_name_helpers
from
sickbeard
import
show_name_helpers
from
sickbeard.exceptions
import
ex
from
sickbeard.exceptions
import
ex
import
requests
from
sickbeard.bs4_parser
import
BS4Parser
from
sickbeard.bs4_parser
import
BS4Parser
from
unidecode
import
unidecode
from
unidecode
import
unidecode
from
sickbeard.helpers
import
sanitizeSceneName
from
sickbeard.helpers
import
sanitizeSceneName
...
@@ -85,11 +84,9 @@ class TorrentLeechProvider(generic.TorrentProvider):
...
@@ -85,11 +84,9 @@ class TorrentLeechProvider(generic.TorrentProvider):
'
login
'
:
'
submit
'
,
'
login
'
:
'
submit
'
,
}
}
self
.
session
=
requests
.
Session
()
try
:
try
:
response
=
self
.
getURL
(
self
.
urls
[
'
login
'
],
post_data
=
login_params
,
timeout
=
30
)
response
=
self
.
getURL
(
self
.
urls
[
'
login
'
],
post_data
=
login_params
,
timeout
=
30
)
except
(
requests
.
exceptions
.
ConnectionError
,
requests
.
exceptions
.
HTTPError
),
e
:
except
Exception
as
e
:
logger
.
log
(
u
'
Unable to connect to
'
+
self
.
name
+
'
provider:
'
+
ex
(
e
),
logger
.
ERROR
)
logger
.
log
(
u
'
Unable to connect to
'
+
self
.
name
+
'
provider:
'
+
ex
(
e
),
logger
.
ERROR
)
return
False
return
False
...
...
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