Advertisement
Guest User

SKY UK

a guest
Apr 10th, 2018
624
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. **------------------------------------------------------------------------------------------------
  2. * @header_start
  3. * WebGrab+Plus ini for grabbing EPG data from TvGuide websites
  4. * @Site: uk-sky.com
  5. * @MinSWversion: V1.1.1/55.26
  6. *   none
  7. * @Revision 8 - [08/06/2016] Blackbear199
  8. *   season/episode improvements.added rating,rating icon
  9. * @Revision 7 - [03/06/2016] Blackbear199
  10. *   get rid of duplicates
  11. * @Revision 6 - [06/11/2015] Jan van Straaten
  12. *   Added productiondate
  13. * @Revision 5 - [23/08/2015] Jan van Straaten
  14. *   Adapted to new (simpler) detail pages of the site
  15. * @Revision 4 - [18/05/2012] Quake505
  16. *   Small change to the Part Scrub, Added an episode scrub,  (yes again) - Ready for GA?
  17. * @Revision 3 - []
  18. *   Changed the Part scrub again, also corrected the program start
  19. * @Revision 2 - []
  20. *   Updates made recommend by Jan, updated the part scrub, updated productiondate and updated description mod
  21. * @Revision 1 - []
  22. *   This is the first version of the file
  23. * @Remarks:
  24. *   less details than before!
  25. * @header_end
  26. **------------------------------------------------------------------------------------------------
  27. site {url=tv.sky.com|timezone=UTC|maxdays=7|cultureinfo=en-GB|charset=ISO-8859-1|episodesystem=onscreen|ratingsystem=UK}
  28.  
  29. *url_index{url|http://epgservices.sky.com/tvlistings-proxy/TVListingsProxy/tvlistings.json?channels=|channel|&dur=1440&detail=2&time=|urldate|&siteId=1}
  30. url_index{url|http://epgservices.sky.com/tvlistings-proxy/TVListingsProxy/tvlistings.json}
  31. url_index.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the index pages
  32. urldate.format {datestring|yyyyMMddHHMM}
  33. *
  34. url_index.headers {method=POST}
  35. url_index.headers {contenttype=application/x-www-form-urlencoded}
  36. url_index.headers {accept=application/json, text/javascript, */*}
  37. url_index.headers {postdata=channels='channel'&time='urldate'&dur=1440&detail=2&siteId=1}
  38. *
  39. index_showsplit.scrub {multi(exclude=first)|program":[|"eventid"|"movielocator"}
  40. index_showsplit.modify {cleanup(removeduplicates=equal,100)}
  41. *
  42. index_variable_element.modify {set|'config_site_id'}
  43. index_urlchannellogo.modify {addstart|http://tv.sky.com/logo/248/60/skychb'index_variable_element'.png}
  44. *
  45. index_start.scrub {single|"start"|:"|",|",}
  46. index_title.scrub {single|"title"|:"|",|",}
  47. *index_description.scrub {single|"shortDesc"|:"|",|",}
  48. index_duration.scrub {single|"dur"|:"|",|",}
  49. index_duration.modify {calculate(format=time)|60 / 60 /}
  50. *
  51. index_urlshow {url|http://tv.sky.com/programme/detail/|channelid":"||",}
  52. index_urlshow.modify {addend|/'{single(include=first)|:"||",|",}'}
  53. index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate} * to speedup the downloading of the detail pages
  54. *
  55. scope.range{(showdetails)|end}
  56. title.scrub {regex||<h1 class=\"bubble-title\">(.+?)</h1>||}
  57. description.scrub {regex||<p class=\"bubble-programme-description description\">(.+?)</p>||}
  58. category.scrub {regex||<span class="bubble-programme-genres">(.+?)</span>||}
  59. category.modify {replace|,|\|} * split in multi
  60. showicon.scrub {regex||<img class=\"bubble-main-image\" src=\"(.+?)\"||}
  61. productiondate.modify {substring(type=regex)|'description' "\((\d{4})\)"}
  62. *
  63. rating.scrub {single|<li class="bubble-programme-attribute parental-rating">|(|)|</li>}
  64. ratingicon.scrub {single|<li class="bubble-programme-attribute parental-rating">|src="|"|</li>}
  65. ratingicon.modify {addstart('ratingicon' not "")|http://tv.sky.com}
  66. *
  67. description.modify {remove|('productiondate')}
  68. description.modify {remove(type=regex)|\(\d+\smins\)}
  69. *
  70. * episode scrubbed from description,most are in () but some are not
  71. temp_1.modify {substring(type=regex)|'description' "\(([ES0-9].+?)\)"} season/episode or just episode in ()
  72. description.modify {remove(temp_1 not "" type=regex)|\s\(S\d+.*?[Ee].*?\d+\)} *(Sxx..E..xx) *disable to leave season/episode info in description
  73. description.modify {remove(temp_1 not "" type=regex)|\s\(E.*\d+\)} *(E..xx) *disable to leave season/episode info in description
  74. description.modify {remove(temp_1 not "" type=regex)|\s\(\d+\/\d+\)} *(xx/xx) *disable to leave season/episode info in description
  75. description.modify {remove(temp_1 not "" type=regex)|\s\(\d+\sof\s\d+\)} *(xx of xx) *disable to leave season/episode info in description
  76. description.modify {cleanup(temp_1 not "")}
  77. temp_1.modify {replace('temp_1' not "" type=regex)|,*\s*[Ee]p*\s*|E}
  78. temp_1.modify {replace('temp_1' not "")|S0|S}
  79. temp_1.modify {replace('temp_1' not "")|E0|E}
  80. temp_1.modify {replace('temp_1' not "")|\sof\s|/}
  81. temp_1.modify {addstart('temp_1' not "")|E} *check if we have only xx/xx
  82. temp_1.modify {replace|ES|S} *season/episode present start with S
  83. temp_1.modify {replace|EE|E} *no season/episode only start with E
  84. episode.modify {addstart('temp_1' not "")|'temp_1'}
  85. *
  86. temp_2.modify {substring('episode' "" type=regex)|'description' "S\d+,*\s*E[Pp]\d+"} *Sxx, Epxx or SxxE.xx  or Sxx E.xx no ()
  87. description.modify {remove('temp_2' not "" type=regex)|S\d+,*\s*E[Pp]\d+} *disable to leave season/episode info in description
  88. temp_2.modify {replace('temp_2' not "" type=regex)|,*\s*E[Pp]|E}
  89. episode.modify {addstart('episode' "")|'temp_2'}
  90. *
  91. temp_3.scrub {regex||<span class=\"bubble-programme-details\">(Season\s*?\d{1,2})||} * the season from details tags
  92. temp_3.modify {replace('temp_3' not "")|Season |S}
  93. temp_4.scrub {regex||<span class=\"bubble-programme-details\">.+?(Episode\s*?\d{1,2})\s||} * the episode from details tags
  94. temp_4.modify {replace('temp_4' not "")|Episode |E}
  95. temp_4.modify {addstart('temp_3' not "")|'temp_3'}
  96. episode.modify {addstart('episode' "")|'temp_4'}
  97. *
  98. *move eposide to temp to remove unwanted matches
  99. temp_5.modify {addstart('episode' not "")|'episode'}
  100. episode.modify {clear}
  101. episode.modify {substring('episode' "" type=regex)|'temp_5' "S\d+E\d+\/\d+"} *SxxExx/xx
  102. episode.modify {substring('episode' "" type=regex)|'temp_5' "S\d+E\d+"} *SxxExx
  103. episode.modify {substring('episode' "" type=regex)|'temp_5' "E\d+\/\d+"} *Exx/xx
  104. episode.modify {substring('episode' "" type=regex)|'temp_5' "E\d+"} *Exx
  105. end_scope
  106. **  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _  _
  107. **      #####  CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
  108. **
  109. *url_index{url|http://epgservices.sky.com/tvlistings-proxy/TVListingsProxy/init.json}
  110. *index_site_channel.scrub {multi|title|:"|",|",}
  111. *index_site_id.scrub {multi|channelid|:"|",|",}
  112. *index_site_channel.modify {replace|\'|}
  113. *scope.range {(channellist)|end}
  114. *index_site_id.modify {cleanup(removeduplicates=equal,100 link="index_site_channel")}
  115. *end_scope
  116. ** @auto_xml_channel_end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement