Repository: Flexget/Flexget

Issue:
title_from (html plugin) no longer works with magnet links
Since v2.0, title_from works incorrectly with magnet links when extracting links from html pages
### Expected behaviour:

title_from should produce a valid title for magnet links as it did with previous v1.x
### Actual behaviour:

title_from: title could not be determined for magnet links
### Steps to reproduce:
- Step 1: checking config

```
flexget -c sample.yml check
2016-06-25 16:15 VERBOSE  check                         Pre-checked 11 configuration lines
2016-06-25 16:15 VERBOSE  check                         Checking config file `/usr/local/scripts/flexget/sample.yml`
2016-06-25 16:15 VERBOSE  check                         Config passed check.
```
- Step 2: Execute flexget with the config. No tv shows produced by html is valid. And thus: "Input html did not return anything".
#### Config:

```
tasks:
  top-seeded-tv:
    inputs:
      - html:
          url: http://kat.cr/tv/
          title_from: url
          links_re: [ magnet ]
    accept_all: yes
    list_add:
      - movie_list: tv

```
#### Log:

cropped for readability.

```
flexget -c sample.yml --test execute
2016-06-25 16:16 INFO     manager                       Test mode, creating a copy from database ...
2016-06-25 16:16 INFO     manager                       Test database created
2016-06-25 16:16 VERBOSE  task_queue                    There are 1 tasks to execute. Shutdown will commence when they have completed.
2016-06-25 16:16 VERBOSE  html          top-seeded-tv   Requesting: http://kat.cr/tv/
2016-06-25 16:16 VERBOSE  html          top-seeded-tv   Response: 200 (OK)
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:30A86E5D11CF73E03D0A264926E1D41B4BA7AC16&dn=game+of+thrones+s06e09+1080p+hdtv+x265+hevc+6ch+600mb+shaanig&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:1184289DDDD9F688585C11DDDE95EBEA2195583B&dn=queen+of+the+south+s01e01+hdtv+xvid+fum+ettv&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:8F7D68D769664A16A4592536627255EA89221D35&dn=game+of+thrones+s06e08+720p+hdtv+x265+hevc+350mb+shaanig&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:F00B56B17E468E308F8174E6DEE383984E9AD0BD&dn=person+of+interest+s05e13+hdtv+x264+lol+ettv&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:855C67E5B9DB14E57B2F4EE319B7A7DBCCFCF622&dn=outcast+s01e04+hdtv+x264+killers+ettv&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  inputs        top-seeded-tv   Input html did not return anything
2016-06-25 16:16 WARNING  details       top-seeded-tv   Task didn't produce any entries. This is likely due to a mis-configured or non-functional input.
2016-06-25 16:16 VERBOSE  details       top-seeded-tv   Summary - Accepted: 0 (Rejected: 0 Undecided: 0 Failed: 0)
2016-06-25 16:16 VERBOSE  list_add      top-seeded-tv   adding accepted entries into movie_list - tv
2016-06-25 16:16 INFO     manager                       Removed test database
```
### Additional information:
- Flexget Version: 2.1.1
- Python Version: 2.7.9
- Installation method: pip
- OS and version: Debian Jessie
- Link to crash log: N/A

title_from (html plugin) no longer works with magnet links
Since v2.0, title_from works incorrectly with magnet links when extracting links from html pages
### Expected behaviour:

title_from should produce a valid title for magnet links as it did with previous v1.x
### Actual behaviour:

title_from: title could not be determined for magnet links
### Steps to reproduce:
- Step 1: checking config

```
flexget -c sample.yml check
2016-06-25 16:15 VERBOSE  check                         Pre-checked 11 configuration lines
2016-06-25 16:15 VERBOSE  check                         Checking config file `/usr/local/scripts/flexget/sample.yml`
2016-06-25 16:15 VERBOSE  check                         Config passed check.
```
- Step 2: Execute flexget with the config. No tv shows produced by html is valid. And thus: "Input html did not return anything".
#### Config:

```
tasks:
  top-seeded-tv:
    inputs:
      - html:
          url: http://kat.cr/tv/
          title_from: url
          links_re: [ magnet ]
    accept_all: yes
    list_add:
      - movie_list: tv

```
#### Log:

cropped for readability.

```
flexget -c sample.yml --test execute
2016-06-25 16:16 INFO     manager                       Test mode, creating a copy from database ...
2016-06-25 16:16 INFO     manager                       Test database created
2016-06-25 16:16 VERBOSE  task_queue                    There are 1 tasks to execute. Shutdown will commence when they have completed.
2016-06-25 16:16 VERBOSE  html          top-seeded-tv   Requesting: http://kat.cr/tv/
2016-06-25 16:16 VERBOSE  html          top-seeded-tv   Response: 200 (OK)
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:30A86E5D11CF73E03D0A264926E1D41B4BA7AC16&dn=game+of+thrones+s06e09+1080p+hdtv+x265+hevc+6ch+600mb+shaanig&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:1184289DDDD9F688585C11DDDE95EBEA2195583B&dn=queen+of+the+south+s01e01+hdtv+xvid+fum+ettv&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:8F7D68D769664A16A4592536627255EA89221D35&dn=game+of+thrones+s06e08+720p+hdtv+x265+hevc+350mb+shaanig&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:F00B56B17E468E308F8174E6DEE383984E9AD0BD&dn=person+of+interest+s05e13+hdtv+x264+lol+ettv&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  html          top-seeded-tv   title could not be determined for link magnet:?xt=urn:btih:855C67E5B9DB14E57B2F4EE319B7A7DBCCFCF622&dn=outcast+s01e04+hdtv+x264+killers+ettv&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
2016-06-25 16:16 WARNING  inputs        top-seeded-tv   Input html did not return anything
2016-06-25 16:16 WARNING  details       top-seeded-tv   Task didn't produce any entries. This is likely due to a mis-configured or non-functional input.
2016-06-25 16:16 VERBOSE  details       top-seeded-tv   Summary - Accepted: 0 (Rejected: 0 Undecided: 0 Failed: 0)
2016-06-25 16:16 VERBOSE  list_add      top-seeded-tv   adding accepted entries into movie_list - tv
2016-06-25 16:16 INFO     manager                       Removed test database
```
### Additional information:
- Flexget Version: 2.1.1
- Python Version: 2.7.9
- Installation method: pip
- OS and version: Debian Jessie
- Link to crash log: N/A



Discussion:
I confirm the same : 

Here's my config

```
 enrey01:
    html:
      url: http://thepiratebay.rs/user/enrey01
      title_from: url
      links_re: [ magnet ]
    manipulate:
      - title:
          from: url
          extract: '&dn=([^&]+)'
    regexp:
      accept:
        - Video2Brain
    transmission: yes
    archive: yes
    transmission:
      host: localhost
      port: 9091
    set:
      path: /home/pi/data/Formations_Video2Brain_ES/
```

And here's the result : 

```
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:ad4b3dfbe52c3de18955af77a1c70f717f5b9dd0&dn=%28Video2Brain%29+Visualizacion+de+datos+con+D3.js+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:a550b15eec76e77beb7e1c9c5a1b2cf89d87b43f&dn=%28Video2Brain%29+Fundamentos+del+growth+hacking+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:7201ce0a00e9b11198c402a8aac97679c13eced2&dn=%28Video2Brain%29+Photoshop+para+disenadores+Color+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:d0b0a26c743443afec63e5f0aeebd82e873ab463&dn=%28Video2Brain%29+50+trucos+de+Photoshop+para+fotografos+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:0a36bbc2f26b07b0cbeb46e43e30aa15cf43988d&dn=%28Video2Brain%29+Como+disenar+una+presentacion+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:2f3f3c29c0561c61189a14dc32b515a00083f47a&dn=%28Video2Brain%29+Modelado+inorganico+basico+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:b967cc36c618f3cc97e7c2e963852f68a9627353&dn=%28Video2Brain%29++Ads+avanzado+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:a775f27f25b5b0e8f1f20b82456591020d7d189b&dn=%28Video2Brain%29+Educacion+financiera.+Control+y+reduccion+de+coste&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:75da3ab3919df6e17ae1daf17f642a5474249419&dn=%28Video2Brain%29+Especial+retoque+fotografico%3A+Catalogo+de+arte+pic&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:80cf425f75db5dd7d33e12c210a561b9122e2a6c&dn=%28Video2Brain%29+Photoshop+para+disenadores+Esenciales+de+tipografi&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:bc94789939b1b3cb0fdc36a4fb69f8fea8cf4ed6&dn=%28Video2Brain%29+Como+gestionar+equipos+de+trabajo+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:c2612e591b3eb32011a08d72410310bac34cfe63&dn=%28Video2brain%29+Sprite+Kit.+Desarrollo+practico+de+videojuegos+par&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:2339cde749ff85749033919c539953d49dfcaefc&dn=%28Video2Brain%29+Ejemplo+practico+con+Photoshop+Escena+de+ciencia+f&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:312628bfede95180707be1f5b1bed32614ce9dfd&dn=%28Video2Brain%29+Fundamentos+de+la+fotografia+Composicion+3&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:0a89a6d4b7dbb78640c73498b9d6401cfe9f16dc&dn=%28Video2Brain%29+Autodesk+3ds+Max+2016+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
```

Additional information:

```
Flexget Version: 2.1.1
Python Version: 2.7.9
Installation method: pip
OS and version: Debian Jessie (On a RaspberryPi 1 rev.02)
Link to crash log: N/A
```

I experience the exact same issue. My config is exactly the same as the ones above. 

Edit: After some more testing, it seems directly related to fix for #1227. Manual reverting of this code seems to fix it.

Additional information:

```
Flexget Version: 2.1.21
Python Version: 2.7
Installation method: pip
OS and version: Ubuntu 14.04.3
Link to crash log: N/A
```

I've got Python 2 and 3 installed on my Rpi but if I make "python --version" I get the 2.7.9 version, so from what I understand I'm using the version 2... Still not working.

Edit : To be sure I removed Python3 but I still have the same problem.

I have the same issue.
Flexget 2.2.7
Python 2.7.12
Installed via PIP on Ubuntu 16.04 LTS

Relevent config stuff:

```
    html:
      url: http://[redacted]
      title_from: url
      links_re: [ magnet ]
    manipulate:
      - title:
          from: url
          extract: '&dn=([^&]+)'
          replace:
            regexp: '[\.\-\+]'
            format: ' '
```

Removing the manipulate section and title_from still produce 0 results.  Output resembles the original posters.

We will need some URL to test this with ... 

There's some in other comments. I tried to look into this a while ago but was blocked by work isp so dropped it... 

Same or they are not working. 

Reverting the change in this commit seems to be working,
https://github.com/Flexget/Flexget/commit/5ea59a40f153b9f3419b9d0a02e33e6b1ad1e909

My guess would be that parse.urlplit or the psixpath. only works in Python 3/works differently in Python 2.7 and 3, but im not that familiar with Python.

I confirm the same : 

Here's my config

```
 enrey01:
    html:
      url: http://thepiratebay.rs/user/enrey01
      title_from: url
      links_re: [ magnet ]
    manipulate:
      - title:
          from: url
          extract: '&dn=([^&]+)'
    regexp:
      accept:
        - Video2Brain
    transmission: yes
    archive: yes
    transmission:
      host: localhost
      port: 9091
    set:
      path: /home/pi/data/Formations_Video2Brain_ES/
```

And here's the result : 

```
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:ad4b3dfbe52c3de18955af77a1c70f717f5b9dd0&dn=%28Video2Brain%29+Visualizacion+de+datos+con+D3.js+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:a550b15eec76e77beb7e1c9c5a1b2cf89d87b43f&dn=%28Video2Brain%29+Fundamentos+del+growth+hacking+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:7201ce0a00e9b11198c402a8aac97679c13eced2&dn=%28Video2Brain%29+Photoshop+para+disenadores+Color+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:d0b0a26c743443afec63e5f0aeebd82e873ab463&dn=%28Video2Brain%29+50+trucos+de+Photoshop+para+fotografos+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:0a36bbc2f26b07b0cbeb46e43e30aa15cf43988d&dn=%28Video2Brain%29+Como+disenar+una+presentacion+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:2f3f3c29c0561c61189a14dc32b515a00083f47a&dn=%28Video2Brain%29+Modelado+inorganico+basico+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:b967cc36c618f3cc97e7c2e963852f68a9627353&dn=%28Video2Brain%29++Ads+avanzado+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:a775f27f25b5b0e8f1f20b82456591020d7d189b&dn=%28Video2Brain%29+Educacion+financiera.+Control+y+reduccion+de+coste&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:75da3ab3919df6e17ae1daf17f642a5474249419&dn=%28Video2Brain%29+Especial+retoque+fotografico%3A+Catalogo+de+arte+pic&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:80cf425f75db5dd7d33e12c210a561b9122e2a6c&dn=%28Video2Brain%29+Photoshop+para+disenadores+Esenciales+de+tipografi&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:bc94789939b1b3cb0fdc36a4fb69f8fea8cf4ed6&dn=%28Video2Brain%29+Como+gestionar+equipos+de+trabajo+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:c2612e591b3eb32011a08d72410310bac34cfe63&dn=%28Video2brain%29+Sprite+Kit.+Desarrollo+practico+de+videojuegos+par&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:2339cde749ff85749033919c539953d49dfcaefc&dn=%28Video2Brain%29+Ejemplo+practico+con+Photoshop+Escena+de+ciencia+f&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:312628bfede95180707be1f5b1bed32614ce9dfd&dn=%28Video2Brain%29+Fundamentos+de+la+fotografia+Composicion+3&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
2016-07-13 11:34 WARNING  html          enrey01         title could not be determined for link magnet:?xt=urn:btih:0a89a6d4b7dbb78640c73498b9d6401cfe9f16dc&dn=%28Video2Brain%29+Autodesk+3ds+Max+2016+%28Esp%29&tr=udp%3A//tracker.leechers-paradise.org%3A6969&tr=udp%3A//zer0day.ch%3A1337&tr=udp%3A//open.demonii.com%3A1337&tr=udp%3A//tracker.coppersurfer.tk%3A6969&tr=udp%3A//exodus.desync.com%3A6969
```

Additional information:

```
Flexget Version: 2.1.1
Python Version: 2.7.9
Installation method: pip
OS and version: Debian Jessie (On a RaspberryPi 1 rev.02)
Link to crash log: N/A
```

I experience the exact same issue. My config is exactly the same as the ones above. 

Edit: After some more testing, it seems directly related to fix for #1227. Manual reverting of this code seems to fix it.

Additional information:

```
Flexget Version: 2.1.21
Python Version: 2.7
Installation method: pip
OS and version: Ubuntu 14.04.3
Link to crash log: N/A
```

I've got Python 2 and 3 installed on my Rpi but if I make "python --version" I get the 2.7.9 version, so from what I understand I'm using the version 2... Still not working.

Edit : To be sure I removed Python3 but I still have the same problem.

I have the same issue.
Flexget 2.2.7
Python 2.7.12
Installed via PIP on Ubuntu 16.04 LTS

Relevent config stuff:

```
    html:
      url: http://[redacted]
      title_from: url
      links_re: [ magnet ]
    manipulate:
      - title:
          from: url
          extract: '&dn=([^&]+)'
          replace:
            regexp: '[\.\-\+]'
            format: ' '
```

Removing the manipulate section and title_from still produce 0 results.  Output resembles the original posters.

We will need some URL to test this with ... 

There's some in other comments. I tried to look into this a while ago but was blocked by work isp so dropped it... 

Same or they are not working. 

Reverting the change in this commit seems to be working,
https://github.com/Flexget/Flexget/commit/5ea59a40f153b9f3419b9d0a02e33e6b1ad1e909

My guess would be that parse.urlplit or the psixpath. only works in Python 3/works differently in Python 2.7 and 3, but im not that familiar with Python.


Resolving patch:
diff --git a/flexget/plugins/input/html.py b/flexget/plugins/input/html.py
--- a/flexget/plugins/input/html.py
+++ b/flexget/plugins/input/html.py
@@ -151,8 +151,14 @@ def _title_from_link(self, link, log_link):
 
     def _title_from_url(self, url):
         parts = parse.urlsplit(url)
-        title = parse.unquote_plus(posixpath.basename(parts.path))
-        return title
+        name = ''
+        if parts.scheme == 'magnet':
+            match = re.search('(?:&dn(\.\d)?=)(.+?)(?:&)', parts.query)
+            if match:
+                name = match.group(1)
+        else:
+            name = posixpath.basename(parts.path)
+        return parse.unquote_plus(name)
 
     def create_entries(self, page_url, soup, config):
 


Test patch: