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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
9b2acb13
Commit
9b2acb13
authored
7 years ago
by
Yoann Laissus
Committed by
miigotu
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
YggTorrent : Fix for session expiration (very short)
parent
2205616b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/providers/yggtorrent.py
+4
-5
4 additions, 5 deletions
sickbeard/providers/yggtorrent.py
with
4 additions
and
5 deletions
sickbeard/providers/yggtorrent.py
+
4
−
5
View file @
9b2acb13
...
...
@@ -61,9 +61,6 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
self
.
cache
=
tvcache
.
TVCache
(
self
,
min_time
=
30
)
def
login
(
self
):
if
any
(
dict_from_cookiejar
(
self
.
session
.
cookies
).
values
()):
return
True
login_params
=
{
'
id
'
:
self
.
username
,
'
pass
'
:
self
.
password
,
...
...
@@ -90,8 +87,6 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
def
search
(
self
,
search_strings
,
age
=
0
,
ep_obj
=
None
):
# pylint: disable=too-many-locals, too-many-branches
results
=
[]
if
not
self
.
login
():
return
results
for
mode
in
search_strings
:
items
=
[]
...
...
@@ -126,6 +121,10 @@ class YggTorrentProvider(TorrentProvider): # pylint: disable=too-many-instance-
if
not
data
:
continue
if
'
logout
'
not
in
data
:
logger
.
log
(
'
Refreshing cookies
'
,
logger
.
DEBUG
)
self
.
login
()
with
BS4Parser
(
data
,
'
html5lib
'
)
as
html
:
torrent_table
=
html
.
find
(
class_
=
'
table
'
)
torrent_rows
=
torrent_table
(
'
tr
'
)
if
torrent_table
else
[]
...
...
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