Guest User

dk.timefor.tv.ini

a guest
Dec 10th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. **------------------------------------------------------------------------------------------------
  2. * @header_start
  3. * WebGrab+Plus ini for grabbing EPG data from TvGuide websites
  4. * @Site: dk.timefor.tv
  5. * @MinSWversion: V1.1.1/52
  6. * @Revision 3 - [20/08/2013] Francis De Paemeleere
  7. * fix showdetail title error + minor fixes
  8. * add automatic channel generation
  9. * @Revision 2 - [25/10/2012] Jan van Straaten
  10. * episode is follwing the xmltv_ns format >> season.episode.part
  11. * @Revision 1 - [01/10/2012] Jesper Schumacher
  12. * in episode : - is replaced with /
  13. * @Remarks: base version taken from en.timefor.tv
  14. * @header_end
  15. **------------------------------------------------------------------------------------------------
  16. site {url=dk.timefor.tv|timezone=UTC+01:00|maxdays=14|cultureinfo=da-DK|charset=UTF-8|titlematchfactor=90|episodesystem=xmltv_ns}
  17. url_index{url()|http://dk.timefor.tv/listings/|channel|/|urldate|}
  18. urldate.format {datestring|yyyy-MM-dd}
  19. index_showsplit.scrub {multi()|<table class="block epg|<tr|"></td>|</table>} * "></td> and not </tr> because indexpage is showing progressbar for current show
  20. index_urlshow {url ()|http://dk.timefor.tv|<td class="title">|href="|" class="programsummary" |</a>}
  21. index_date.scrub {single()|defaultDate:"||", |}
  22. index_start.scrub {single()|"time">|<p>|:</p>|</p>}
  23. index_title.scrub {single()|programid="|">|</a>|</a>}
  24.  
  25. **************** Showdetails ***************
  26. title.scrub {single(includeblock=1)|<h2|>|</h2>|</h2>}
  27. titleoriginal.scrub {single(lang=en)|Original titel:|">|</p>|</td></tr>}
  28. subtitle.scrub {single()|Episode titel:|">|</p>|</td></tr>} * if a real episode title is available
  29. temp_3.scrub {single (include=last)|class="epg"|"> - |</span>|</p><div} * will be used if no episode title is available
  30. description.scrub {single (separator="Læs mere " force include=first)|<meta name="Description" content="|||">}
  31. category.scrub {single(separator="/")|Genre:|">|</p>|</td></tr>} * finds genre eg. komedie, tv serier, etc.
  32. temp_1.scrub {single()|Episode:</strong></p>|sæson |</p></td></tr>|</tr>} * finds the "sæson" number, if it is a sæson
  33. category.scrub {single(separator="/")|Type:|">|</p>|</td></tr>} * finds more Typeinfo eg. Film, serie etc.
  34. productiondate.scrub {single()|Fra:|">|</p>|</td></tr>} * finds productionyear
  35. episode.scrub {single()|Episode:|">|</p>|</td></tr>} * extracts all episode info incl. sæson-info
  36. actor.scrub {multi()|<h3>Medvirkende</h3>|<strong>|</p>|</table>} * finds actor list, HTML junk is removed with modify later
  37.  
  38. index_variable_element.modify {clear}
  39. index_variable_element.modify {addstart()|'config_site_id'}
  40.  
  41. scope.range {(showdetails)|end}
  42. actor.modify {remove(type=regex)|(</strong><br>.*)} * remove any actor role (after the </strong><br>)
  43. ***episode in xmltv_ns format***
  44. episode.modify {remove()|sæson 'temp_1'} * removes "sæson" and number in episode
  45. episode.modify {remove()| }
  46. episode.modify {replace()|:|\|} * replace : with | (= make multi)
  47. temp_2.modify {substring(type=element)|'episode' 1 1} * is the number of episodes
  48. episode.modify {substring(type=element)|0 1} * is the episode number
  49. episode.modify {calculate( not="" format=F0)|1 -} * contains the xmltv_ns episode number
  50. temp_1.modify {calculate( not="" format=F0)|1 -} * contains the xmltv_ns season number
  51. episode.modify {addstart()|'temp_1'.}
  52. episode.modify {addend('temp_2' not="")|/'temp_2'}
  53. episode.modify {addend()|.}
  54. episode.modify {clear('episode' ="..")} * remove empty episode info
  55. subtitle.modify {addstart(="")|'temp_3'} * add, if no real episode title was found
  56. category.modify {replace|/|\|}
  57. end_scope
  58.  
  59. ** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  60. ** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
  61. **
  62. ** @auto_xml_channel_start
  63. *subpage.format {list|ee|lv|lt|nl|be|dk|uk|fi|fr|it|no|pl|ru|sw|es|se|cz|tr|de|at}
  64. *url_index{url()|http://dk.timefor.tv/ajax/channel_list.php?language=|subpage|}
  65. *index_site_id.scrub {multi()||||}
  66. *scope.range {(channellist)|end}
  67. ** now change the channel names according to the country groups (because there can be duplicate channel names between diff. country groups!)
  68. ** find all the country groups
  69. *index_temp_1.modify {substring(type=regex)|'index_site_id' "<div id=\"channels(.*?)\""}
  70. *index_temp_1.modify {cleanup(removeduplicates=equal,100)}
  71. *index_temp_5.modify {calculate(type=element format=F0)|'index_temp_1' #} * how many elements? Used as loop counter.
  72. *loop {('index_temp_5' > "0" max=50)|end}
  73. *index_temp_5.modify {calculate(format=F0)|1 -} * decrease the loop counter
  74. *index_temp_2.modify {substring(type=element)|'index_temp_1' 'index_temp_5' 1} * element to work on
  75. *index_site_id.modify {replace(type=regex)|<div id="channels'index_temp_2'".*?<ul.*?(?:<li.*?<p.*?(>).*?</p>.*?</li>)*</ul></div>|>'index_temp_2' }
  76. *end_loop
  77. *index_site_channel.modify {addstart|'index_site_id'}
  78. ** now get id and channel name
  79. *index_site_channel.modify {substring(type=regex)|<ul.*?(?:<li.*?<p.*?>(.*?)</p>.*?</li>)*</ul>}
  80. *index_site_id.modify {substring(type=regex)|<ul.*?(?:<li.*?onclick="document\.location\.href=\'/tv-guide/(.*?)\'.*?</li>)*</ul>}
  81. *
  82. *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
  83. *end_scope
  84. ** @auto_xml_channel_end
Advertisement
Add Comment
Please, Sign In to add comment