Certification & Writers OFDb (1 Viewer)

Schenk2302

Portal Pro
September 12, 2008
50
14
Bonn
Home Country
Germany Germany
Hi,

add these to your ofdb.xml and you'll get the Writers and (if available) the german certification :)

PHP:
	 <!-- Certification -->
	<retrieve name="details_page" url="http://www.imdb.com/title/${movie.imdb_id}"/>
    <parse name="certification" input="${details_page}" regex='&gt;\s+Germany:((?:12)|(?:16)|(?:18)|(?:6)|(?:o.Al.))&lt;/a&gt;'/>
    <set name='movie.certification' value='${certification[0][0]:htmldecode}'/>

	<!-- Writers -->
	<retrieve name="details_page" url="http://www.imdb.com/title/${movie.imdb_id}"/>
    <parse name="writers_block" input="${details_page}" regex='&lt;div class="info"&gt;\s+&lt;h5&gt;Writer[s]?(?: &lt;a href="[^"]+"&gt;\([^)]+\)&lt;/a&gt;)?:&lt;/h5&gt;.+?&lt;/div&gt;'/>
    <parse name='writers' input="${writers_block}" regex='&lt;a href="/name/nm\d+/"&gt;([^&lt;]+)&lt;/a&gt;'/>
    <set name='movie.writers' value=''/>
    <loop name='currWriter' on='writers'>
      <set name='movie.writers' value='${movie.writers}|${currWriter[0]:htmldecode}'/>
    </loop>

Here you go, have fun

Schenk
 

Users who are viewing this thread

Top Bottom