Skip to content

[fix] divxatope to use new domain divxatope1#1655

Merged
cvium merged 4 commits intoFlexget:developfrom
malkavi:patch-5
Feb 10, 2017
Merged

[fix] divxatope to use new domain divxatope1#1655
cvium merged 4 commits intoFlexget:developfrom
malkavi:patch-5

Conversation

@malkavi
Copy link
Copy Markdown
Contributor

@malkavi malkavi commented Jan 25, 2017

New domain divxatope1 instead of divxatope. Updated urlrewrite and search.

Motivation for changes:

divxatope redirected to divxatope1

Detailed changes:

  • Detect the new domain in function url_rewritable
  • Updated search, use divxatope1

Addressed issues:

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

Log and/or tests output (preferably both):

Search example

Entry 'El Hogar De Miss Peregrine Para Ni�os Peculiares  BluRayRip AC3 5.1                              ' URL rewritten to http://tumejorjuego.com/redirect/divxatope1.php?link=descargar-torrent/90323_el-hogar-de-miss-peregrine-para-nia-os-peculiares-bluray-rip-ac3-5-1-espaa-ol-castellano-2016/ (with divxatope)

New domain divxatope1 instead of divxatope. Updated urlrewrite and search.
return (
url.startswith('http://www.divxatope.com/descargar') or url.startswith('http://divxatope.com/descargar')
)
rewritable_regex = '^http:\/\/(www.)?divxatope1?.com.*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

https is not possible?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Their certificate is expired, but I will add the "https?" with the other changes.

if quality_lan is None:
continue
quality_lan = quality_lan.contents
#log.debug(len(quality_lan))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should remove this line

query = normalize_unicode(search_string)
query = regex.findall(query)[0]
if regex.findall(query):
query = regex.findall(query)[0]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is findall necessary if you're just grabbing the first one anyway?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What should I use instead?

Copy link
Copy Markdown
Contributor Author

@malkavi malkavi Jan 25, 2017

Choose a reason for hiding this comment

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

This?

if regex.search(query) is not None:
    query = regex.search(query).group(1)

log.debug('Searching DivxATope %s' % query)
query = query.encode('utf8', 'ignore')
data = {'search': query}
#data = {'search': query}
Copy link
Copy Markdown
Contributor

@cvium cvium Jan 25, 2017

Choose a reason for hiding this comment

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

Remove this as well

Removed unnecessary comments
Year removed with sub
def url_rewrite(self, task, entry):
# Rewrite divxatope.com/descargar/ to divxatope.com/descarga-torrent/
entry['url'] = re.sub('/descargar', '/descarga-torrent', entry['url'])
entry['url'] = re.sub("/descargar/", "/descarga-torrent/", entry['url'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like this change. All other strings in this plugin use single quotes.

return set()
log.debug('Search DivxATope')
url_search = 'http://www.divxatope.com/buscar/descargas/'
#url_search = 'http://www.divxatope.com/buscar/descargas/'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can just remove this. If we need the old URL it's available in Git history.

@cvium cvium merged commit 6eb9ec9 into Flexget:develop Feb 10, 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.

2 participants