You are here

Custom mdbini file

7 posts / 0 new
Last post
Karolis
Offline
Karolis's picture
Joined: 8 years
Last seen: 3 years
Custom mdbini file

Hi,

I'm currently making my own mdbini file. Information is being retrieved from this page - http://obuolys.lt. So far, I was able to get search results and grab the title with production date. However, the problem is that wb+ ignores the prodcution date when matching epg and mdb values. For example, there is a movie titled "Hope Springs", which was released in 2012. The search engine in that page uses only title, there is no way to add production date. So, after looking for a movie, the results are:

  • Hope Springs (2003)
  • Hope Springs (2012)

Now, when matching these results with epg entries, somehow wb+ ignores the production date and doen't find any matches, which is wrong. From mdb.config.xml:

<matchmovie mustmatch="title,productiondate" optional="" minimum="2"/>

obuolys.lt.obuolys.ini

**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing IMDB data from TvGuide websites
* @MinSWversion: V1.1.1/50
* @Site: obuolys.lt, primary search with obuolys.lt
* @Revision 0 - [09/03/2015] Karolis Vaikutis
*     - creation
* @Remarks:
*      - none
* @header_end
**------------------------------------------------------------------------------------------------

site {url=obuolys.lt|cultureinfo=lt-LT|charset=UTF-8|matchfactor=90|searchsite=obuolys}
* primary search: (i.e. http://www.obuolys.lt/paieska/?q=Die+Hard)
url_primarysearch {url(urlencode=1,2)|http://www.obuolys.lt/paieska/?q=|'title'|}

show_id.scrub {multi(exclude="festivalis")|primary|<p class="search-result">|<a href="http://webgrabplus.com/kinozona/filmas/%7C.html">|[Filmas]}

url_mdb_p1 {url|primary|http://www.obuolys.lt/kinozona/filmas/|show_id|.html}

mdb_title.scrub {single(debug)|p1|<div class="h1blok">|/ |</span>|</h1>}
mdb_productiondate.scrub {single(debug)|p1|Premjera:|, |</strong>|<br/>}

*mdb_title.scrub {multi()|p1|<div class="h1blok">|"|"|</h1>}

mdb_director.scrub {multi(debug)|p1|Režisavo:|">|</a>|                </strong><br/>}

Also, I am not getting any debug messages when grabbing productiondate and director.

If I use these settings for matching:

<matchmovie mustmatch="title,productiondate" optional="" minimum="1"/>

...then I am getting this:

Matching entry found in obuolys.lt, showid = 10641-prazydusios-viltys
No usefull data in MDB site!!
Object reference not set to an instance of an object.
WebGrab+Plus
   at WebGrab.PostProcess.LocalMdb.AddNoMatch2LocalMdb(XmlDocument xlmdb, XmlNode xn, String searchstring)
   at WebGrab.PostProcess..ctor(String[] processes)
   at WebGrab.Program.Main(String[] args)

So, it gets showid 10641-prazydusios-viltys (which is the first search result).

Karolis

p.s. Sorry for using quote bbc for code, I didn't manage to post xml code into <pre> tags.

Karolis
Offline
Karolis's picture
Joined: 8 years
Last seen: 3 years

I found my mistake. I didn't read the comments in default mdb.config carefully, enough. Using this the matching works like it should:

<matchmovie mustmatch="title" optional="productiondate" minimum="2"/> 

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 11 years
Last seen: 14 min
Is the support helpful?
support us

Hi,

Very interesting that you create a new man ini! I am currently absent from all my stuff so cannot assist you right now. I will contact you next week

Jan

Karolis
Offline
Karolis's picture
Joined: 8 years
Last seen: 3 years

Actually, everything is going great with the creation of the mdbini. Though, I have a question. Is it possible to update epg values only if mdb finds information about them? Currently, if mdbini can't find any matches of a specific show, it doesn't skip it, but applies values from mdb (even tho it didn't get any data) and the output looks like this:

It would be useful if we could make some kind of conditional statements to keep original epg values depending on the success of mdb search results, for example:

<title>['mdb-success' ? 'mdb-title' : 'title']</title>

...or...

<title result=success>'mdb-title'</title>

<title result=failure>'title'</title>

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 11 years
Last seen: 14 min
Is the support helpful?
support us

Hi,

as said , I can't help you right now because I am on the move, but just a question : Are you using the latest build? I can be mistaken, but I remember that there was a similar question some time ago which appeared to be a bug. I fixed it so if I am right it should work in the latest build.
But, maybe I am wrong.
I will contact you early next week and would like to have a look at your mdb​ini and your mdbconfig

Jan

Karolis
Offline
Karolis's picture
Joined: 8 years
Last seen: 3 years

Hi Jan,

Sure. Take your time.

I downloaded the latest build and installed an upgrade (Upgrade 54). The log file says this - "WebGrab+Plus/w MDB & REX Postprocess -- version 1.54.6/0.01 -- Jan van Straaten" and "Starting MDB Postprocess .. Version: 1.5".

I attached all your requested files.

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 11 years
Last seen: 14 min
Is the support helpful?
support us

Hi,

the problem is in mdb.config.xml. Any character you add there will come into the output xmltv, unless you surround it by {}.

Like, you specify <title>'mdb-title' ('mdb-productiondate')</title>.  :
There is a space, a ( and a ). So if for example mdb-title and mdb-productiondate have no value (e.g because that show had no match in the mdb site) you get
<title>​​ ()</title>​

Try this ; <title>'mdb-title'{ ('mdb-productiondate')}</title>
Then if mdb-productiondate has no value, these extra characters are ignored.​ The {} characters are not displayed because they are control chars

Also.  .. I am not sure if the nesting of {} in

<desc>{{'mdb-description(, )'}{\n\nRežisavo: 'mdb-director(, )'.}{\n\nVaidina: 'mdb-actor(, )' ir kiti.}}</desc>

works. Try without the starting and trailing {} . If you want to display any {} try to escape them like \{ and \} , but I am not sure about that. maybe I forgot to add that in the program.

 

Jan

p.s. One more small thing in your ini:
You use :
mdb_description.modify {addend|.}
This adds a . even when mdb_description is empty. Better make it conditional:
mdb_description.modify {addend('mdb_description' not ""|.} or short:
mdb_description.modify {addend(not "")|.}​

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl