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

Skip to content

Conversation

@malkavi
Copy link
Contributor

@malkavi malkavi commented Jan 3, 2018

Now Newpct1 and Newpct share torrent urlrewrite.

Motivation for changes:

Changes in newpct1

Detailed changes:

  • newpct1 and newpct share code

Now Newpct1 and Newpct share torrent urlrewrite.
torrent_id_prog = re.compile("(?:parametros\s*=\s*\n?)\s*{\s*\n(?:\s*'\w+'\s*:.*\n)+\s*'(?:torrentID|id)"
"'\s*:\s*'(\d+)'")
torrent_ids = soup.findAll(text=torrent_id_prog)
if len(torrent_ids):
Copy link
Member

Choose a reason for hiding this comment

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

you can do just if torrent_ids:


NEWPCT_TORRENT_FORMAT = 'http://www.newpct.com/torrents/{:0>6}.torrent'
NEWPCT1_TORRENT_FORMAT = 'http://www.newpct1.com/download/{}.torrent'
NEWPCT_TORRENT_FORMAT = 'http://www.newpct.com/torrents/{:0>6}.torrent'
Copy link
Member

Choose a reason for hiding this comment

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

looks like there's an extra space there

torrent_id_prog = re.compile('function openTorrent.*\n.*\{.*(\n.*)+window\.location\.href =\s*\".*\/(\d+).*\";')
torrent_ids = soup.findAll(text=torrent_id_prog)
if len(torrent_ids):
log.debug('torrent ID not found, searching openTorrent script')
Copy link
Contributor

@cvium cvium Jan 3, 2018

Choose a reason for hiding this comment

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

This doesn't really make sense if torrent_ids is empty/none or maybe I'm misunderstanding what that log is referencing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are two attempts to find torrent id, first regexp with 'parametros', then regexp with opentorrent. The log is a reference to the first regexp failure. Should I remove the log?

@liiight liiight merged commit 8175b7e into Flexget:develop Jan 4, 2018
@ciltocruz
Copy link

Sorry for noise closed topics.
I think that this is where I should write. If not, tell me where.

I didn't want to open new topics because I didn't want to overload the error issues.

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.

4 participants