![]() |
CreateSearchUrl Error - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Scrapers (https://forum.kodi.tv/forumdisplay.php?fid=60) +--- Thread: CreateSearchUrl Error (/showthread.php?tid=85985) |
CreateSearchUrl Error - idzjuba - 2010-11-23 Hello, I have a scraper which sometimes builds incorrect search url. Dharma Rc1 is used. CreateSearchUrl is following: <CreateSearchUrl dest="3"> <RegExp input="$$1" output="<url>http://yamsonline.com/component/content/?option=com_jmovies&Itemid=69&task=mov_search&movnme=\1&search_mov=Search</url>" dest="3"> <expression>(.*)</expression> </RegExp> </CreateSearchUrl> I use folder name for lookups. So for folder a (1899) Search url is correct 15:10:00 T:1472 M: 89997312 DEBUG: VideoInfoScanner: Scanning dir 'c:\tmp\scraper\a (1899)\' as not in the database 15:10:00 T:1472 M: 89985024 DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'c:\tmp\scraper\a (1899)\w.avi' 15:10:00 T:1472 M: 89939968 DEBUG: CIMDB::InternalFindMovie: Searching for 'a (1899)' using xxxxonline.com scraper (path: 'C:\Documents and Settings\i.dziuba\Application Data\XBMC\addons\metadata.xxxxonline.com', content: 'movies', version: '1.0.1') 15:10:00 T:1472 M: 89931776 DEBUG: scraper: CreateSearchUrl returned <url>http://xxxxonline.com/component/content/?option=com_jmovies&Itemid=69&task=mov_search&movnme=a%20%281899%29&search_mov=Search</url> 15:10:00 T:1472 M: 89866240 DEBUG: FileCurl::Open(042FEE2C) http://xxxxonline.com/component/content/?option=com_jmovies&Itemid=69&task=mov_search&movnme=a%20%281899%29&search_mov=Search But for folder a (1900) Scraper engine cuts digits with brackets and only "a" is left. 15:12:57 T:4328 M: 92512256 DEBUG: VideoInfoScanner: Rescanning dir 'c:\tmp\scraper\a (1900)\' due to change (fast1290514352 != 900A7AC36EAD5613832270D4AEDB2BF4) 15:12:57 T:4328 M: 92499968 DEBUG: VideoInfoScanner: No NFO file found. Using title search for 'c:\tmp\scraper\a (1900)\rt.avi' 15:12:57 T:4328 M: 92454912 DEBUG: CIMDB::InternalFindMovie: Searching for 'a' using xxxxonline.com scraper (path: 'C:\Documents and Settings\i.dziuba\Application Data\XBMC\addons\metadata.xxxxonline.com', content: 'movies', version: '1.0.1') 15:12:57 T:4328 M: 92442624 DEBUG: scraper: CreateSearchUrl returned <url>http://xxxxonline.com/component/content/?option=com_jmovies&Itemid=69&task=mov_search&movnme=a&search_mov=Search</url> 15:12:57 T:4328 M: 92377088 DEBUG: FileCurl::Open(03ECEE2C) http://xxxxonline.com/component/content/?option=com_jmovies&Itemid=69&task=mov_search&movnme=a&search_mov=Search This is true for numbers above 1900. Numbers below 1900 work correctly. Looks like a bug or not? Thank you - spiff - 2010-11-23 not a bug. we assume it's the year and thus strip it off. it's avail in $$2. this is very useful for search engines that allows specifying it in a separate field. - idzjuba - 2010-11-23 spiff Wrote:not a bug. we assume it's the year and thus strip it off. it's avail in $$2. this is very useful for search engines that allows specifying it in a separate field. Thanks for reply. Now it is clear. But could you advise how to add ($$2 ) to search url only if it is set. I tried "conditional" statement but failed. Thanks - spiff - 2010-11-23 basically do both then copy the one you want to the resulting buffer Code: <RegExp input="$$1" output="url \1 ($$2)" dest="5"> - spiff - 2010-11-23 alternatively you can do something ala Code: <RegExp input="$$1 ($$2)" output="\1" dest="1"> - idzjuba - 2010-11-23 spiff Wrote:alternatively you can do something ala Ok, good. Thanks a lot for your help! |