Opened 18 years ago
Closed 18 years ago
#4916 closed patch (worksforme)
ofdb.py: try harder to find movie ID
| Reported by: | Owned by: | Anduin Withers | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.21.1 |
| Component: | mythvideo | Version: | unknown |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
ofdb.py sometimes will not return a movie id although the website is clearly returning search hits. It seems that for some search terms, the web site containing the search results uses a different path to point to the detail page for that movie. It's easy to work around that because ofdb.de just uses HTTP 301 redirects to point to the correct address.
Here's an example with the new URL format:
{{{./ofdb.py -r -M 'wutprobe' | grep 'Wutprobe'
<b>Deutscher Titel:</b><br><br>1. <a href="view.php?page=film&fid=33867" onmouseover="Tip('<img src="images/film/33/33867.jpg" width="120" height="180">',SHADOW,true)">Wutprobe, Die<font size="1"> / Anger Management</font> (2003)</a><br><br><br></font></p><br> }}}
Here's the old format:
./ofdb.py -r -M 'die wutprobe' | grep 'Wutprobe'
<b>Deutscher Titel:</b><br><br>1. <a href="film/33867,Die-Wutprobe" onmouseover="Tip('<img src="images/film/33/33867.jpg" width="120" height="180">',SHADOW,true)">Wutprobe, Die<font size="1"> / Anger Management</font> (2003)</a><br><br><br></font></p><br>
It's really odd because the search terms don't differ much and actually point to the same movies. Anyways, the attached patch fixes this.
Attachments (1)
Change History (4)
by , 18 years ago
| Attachment: | ofdb.py-improved_url_parsing.diff added |
|---|
comment:1 by , 18 years ago
| Milestone: | unknown → 0.21.1 |
|---|
comment:2 by , 18 years ago
| Status: | new → accepted |
|---|
comment:3 by , 18 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | accepted → closed |

I seem to have taken long enough to get to this that the problem no longer exists.