Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Danfocus
Copy link
Contributor

Motivation for changes:

Sometimes rutracker.org available only throw https

Detailed changes:

  • Add new property use_ssl(boolean)
  • Small code changes

Addressed issues:

  • None

Config usage if relevant (new plugin or updated schema):

    rutracker_auth:
      username: 'username_here'
      password: 'password_here'
      use_ssl: yes

Log and/or tests output (preferably both):

  • None

@Danfocus Danfocus changed the title New property for using https rutracker - new property for using https Feb 21, 2017
@liiight
Copy link
Member

liiight commented Feb 21, 2017

Why make it optional? Why not always use https?

@Danfocus
Copy link
Contributor Author

Danfocus commented Feb 21, 2017

Why make it optional? Why not always use https?

I check now - rutracker always redirect to https.
Changes are made

@Danfocus Danfocus changed the title rutracker - new property for using https rutracker - always use https Feb 21, 2017

class RutrackerAuth(AuthBase):
"""Supports downloading of torrents from 'rutracker' tracker
if you pass cookies (CookieJar) to constructor then authentication will be bypassed and cookies will be just set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesn't look longer than 120 chars, so why the linebreak?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert it

for entry in task.accepted:
if entry['url'].startswith('http://rutracker.org/forum/viewtopic.php'):
if entry['url'].startswith(
'{}/forum/viewtopic.php'.format(BASE_URL)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Another weird linebreak.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove linebreak


def __call__(self, r):
url = r.url
id = re.findall(r'\d+', url)[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're already in there, you should change this variable name to something other than id.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to t_id (thread_id)

@Danfocus
Copy link
Contributor Author

Changes are made

@liiight liiight merged commit 956c187 into Flexget:develop Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants