Need help with scraper, removing space - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Scraper Development (/forumdisplay.php?fid=60)
+--- Thread: Need help with scraper, removing space (/showthread.php?tid=54222)
Need help with scraper, removing space - stacked - 2009-07-08 10:10
This returns the url with the found expression. eg "http://www.site.com/?q=The Movie". But somehow this url returns an error in curl. If the url was "http://www.site.com/?q=The%20Movie", everything would work. How can I replace all the space found from the expression with %20?
btw, would trim help me here?
- spiff - 2009-07-08 10:26
- stacked - 2009-07-08 20:02
I tried that, but it only works on titles with two words. If there are more than two words, the spaces aren't replaced by %20.
btw, is it possible to scan a movie with imdb, then scan it again with another scraper to just add a trailer without replacing any other details?
- spiff - 2009-07-08 20:30
no, but you can add the trailer lookup to the imdb scraper.
you need to massage the expression a bit to accept more than one space, it was just to give you the idea.
- stacked - 2009-07-09 00:26
thanks. i changed it up a little and got it working.
- AngryFarmer - 2009-10-25 13:54
Hey thanks! It helped me a lot !
- UsagiYojimbo - 2010-06-21 06:56
Isn't there an encode attribute to the RegExp tag, that should do the trick?
- spiff - 2010-06-21 10:41
these days yes. but not back when this topic was alive.
- UsagiYojimbo - 2010-06-27 08:24
spiff Wrote:these days yes. but not back when this topic was alive.BTW, nor the \s construct, neither the trim switch match TAB characters...
- spiff - 2010-06-27 12:22
i added \t to trim a few weeks back.