summaryrefslogtreecommitdiff
path: root/plugin.video.hak5
diff options
context:
space:
mode:
authorskipmodea1 <skipmodea1@outlook.com>2017-10-11 21:43:16 +0200
committerlearningit <scottyroscoe13@gmail.com>2017-10-11 15:43:16 -0400
commitf9a09137e968901c8bc5995f10212c1c2bac26e2 (patch)
tree093fd9f40bc24597e1d9fe7d466e1f7373298c7b /plugin.video.hak5
parentf335d55bbd81d1442f88d1bc85bfc3783d3f0afb (diff)
[plugin.video.hak5] 1.0.1 (#1453)
Diffstat (limited to 'plugin.video.hak5')
-rw-r--r--plugin.video.hak5/addon.xml4
-rw-r--r--plugin.video.hak5/changelog.txt4
-rw-r--r--plugin.video.hak5/resources/lib/hak5_const.py7
-rw-r--r--plugin.video.hak5/resources/lib/hak5_list_episodes.py44
-rw-r--r--plugin.video.hak5/resources/lib/hak5_list_seasons.py3
-rw-r--r--plugin.video.hak5/resources/lib/hak5_main.py16
6 files changed, 28 insertions, 50 deletions
diff --git a/plugin.video.hak5/addon.xml b/plugin.video.hak5/addon.xml
index 7e0e995..416f26e 100644
--- a/plugin.video.hak5/addon.xml
+++ b/plugin.video.hak5/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.hak5"
name="Hak5"
- version="1.0.0"
+ version="1.0.1"
provider-name="Skipmode A1">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
@@ -19,7 +19,7 @@
<language>en</language>
<platform>all</platform>
<license>GNU GENERAL PUBLIC LICENSE. Version 3, June 2007</license>
- <forum></forum>
+ <forum>https://forum.kodi.tv/showthread.php?tid=318316</forum>
<website>http://hak5.com</website>
<email></email>
<source>https://github.com/skipmodea1/plugin.video.hak5</source>
diff --git a/plugin.video.hak5/changelog.txt b/plugin.video.hak5/changelog.txt
index 55706c6..de23b40 100644
--- a/plugin.video.hak5/changelog.txt
+++ b/plugin.video.hak5/changelog.txt
@@ -1,2 +1,6 @@
+v1.0.1 (2017-10-11)
+Fixes due to website changes
+Removed Pinapple University videos
+
v1.0.0 (2017-07-09)
initial version \ No newline at end of file
diff --git a/plugin.video.hak5/resources/lib/hak5_const.py b/plugin.video.hak5/resources/lib/hak5_const.py
index 129de87..83ad2bd 100644
--- a/plugin.video.hak5/resources/lib/hak5_const.py
+++ b/plugin.video.hak5/resources/lib/hak5_const.py
@@ -12,13 +12,12 @@ SETTINGS = xbmcaddon.Addon()
LANGUAGE = SETTINGS.getLocalizedString
IMAGES_PATH = os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources', 'images')
HAK5RECENTLYADDEDURL = 'http://www.hak5.org/category/episodes'
-HAK5SEASONSURLHTTP = 'http://www.hak5.org/category/episodes'
-HAK5SEASONSURLHTTPS = 'https://www.hak5.org/category/episodes'
+HAK5SEASONSURLHTTPS = 'https://www.hak5.org/shows/hak5'
HAKTIKRECENTLYADDEDURL = 'http://www.hak5.org/category/episodes/haktip/page/001'
THREATWIRERECENTLYADDEDURL = 'http://www.hak5.org/category/episodes/threatwire/page/001'
TEKTHINGRECENTLYADDEDURL = 'http://www.hak5.org/category/episodes/tekthing/page/001'
PINEAPPLEUNIVERSITYRECENTLYADDEDURL = 'http://www.hak5.org/category/episodes/pineapple-university'
METASPLOITRECENTLYADDEDURL = 'http://www.hak5.org/category/episodes/metasploit-minute/page/001'
HEADERS = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
-DATE = "2017-07-09"
-VERSION = "1.0.0" \ No newline at end of file
+DATE = "2017-10-11"
+VERSION = "1.0.1" \ No newline at end of file
diff --git a/plugin.video.hak5/resources/lib/hak5_list_episodes.py b/plugin.video.hak5/resources/lib/hak5_list_episodes.py
index 5979c73..6c95be1 100644
--- a/plugin.video.hak5/resources/lib/hak5_list_episodes.py
+++ b/plugin.video.hak5/resources/lib/hak5_list_episodes.py
@@ -95,41 +95,25 @@ class Main:
# xbmc.log("[ADDON] %s v%s (%s) debug mode, %s = %s" % (
# ADDON, VERSION, DATE, "html_source", str(html_source)), xbmc.LOGDEBUG)
- # <div id="post-8791" class="blog-item video-item post-8791 post type-post status-publish format-standard has-post-thumbnail hentry category-haktip ...
- # <div class="row ">
- # <div class="col-md-6 col-sm-6">
# <div class="item-thumbnail">
- # <a href="https://www.hak5.org/episodes/season-22/hak5-2217-bushveld-b-roll-hack-across-the-planet" title="Hak5 2217 – Bushveld B-Roll – Hack Across the Planet">
- # <img width="300" height="169" src="https://www.hak5.org/wp-content/uploads/2017/07/hak5-2217-bushveld-b-roll-hack-a-300x169.jpg" ...
+ # <a href="https://www.hak5.org/episodes/3-billion-yahoo-accounts-hacked-disqus-hacked-threat-wire">
+ # <img width="520" height="293" src="https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-520x293.jpg" class="attachment-thumb_520x293 size-thumb_520x293 wp-post-image" alt="" srcset="https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-520x293.jpg 520w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-150x84.jpg 150w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-300x169.jpg 300w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-1024x576.jpg 1024w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-260x146.jpg 260w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-356x200.jpg 356w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-370x208.jpg 370w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-180x101.jpg 180w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-130x73.jpg 130w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-748x421.jpg 748w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked-624x351.jpg 624w, https://www.hak5.org/wp-content/uploads/2017/10/3-billion-yahoo-accounts-hacked.jpg 1280w" sizes="(max-width: 520px) 100vw, 520px" /> <div class="link-overlay fa fa-search"></div>
# </a>
# </div>
- # <div class="clearfix"></div>
- # </div><!--/col6-->
- # <div class="col-md-6 col-sm-6">
- # <div class="item-head row">
- # <div class="col-md-10 col-sm-10 col-xs-9">
- # <h3><a class="maincolor2hover" href="https://www.hak5.org/episodes/season-22/hak5-2217-bushveld-b-roll-hack-across-the-planet" rel="8851"
- # title="Hak5 2217 – Bushveld B-Roll – Hack Across the Planet">Hak5 2217 &#8211; Bushveld B-Roll &#8211; Hack Across the Planet</a></h3>
- # <div class="blog-meta">
- # <span><a href="https://www.hak5.org/author/snubs" title="Posts by Shannon Morse" rel="author">Shannon Morse</a></span> |
- # <span><a href="https://www.hak5.org/category/episodes/season-22" rel="category tag">Season 22</a></span>
- # |
- # <span><a href="https://www.hak5.org/episodes/season-22/hak5-2217-bushveld-b-roll-hack-across-the-planet#respond">0 Comments</a></span>
- # </div>
- # </div>
- # <div class="col-md-2 col-sm-2 col-xs-3">
- # <div class="blog-date">
- # <span>05</span>
- # <span>Jul</span>
+ # <div class="item-head">
+ # <h3><a href="https://www.hak5.org/episodes/3-billion-yahoo-accounts-hacked-disqus-hacked-threat-wire" rel="9479" title="3 Billion Yahoo Accounts Hacked; Disqus Hacked! – Threat Wire">3 Billion Yahoo Accounts Hacked; Disqus Hacked! &#8211; Threat Wire</a>
+ # </h3>
+ # <div class="item-info hidden">
+ # <span class="item-author"><a href="https://www.hak5.org/author/snubs" title="Posts by Shannon Morse" rel="author">Shannon Morse</a></span>
+ # <span class="item-date">October 10, 2017</span>
+ # <div class="item-meta">
+ # <span><i class="fa fa-eye"></i> 0</span> <span><i class="fa fa-comment"></i> 0</span> <span><i class="fa fa-thumbs-up"></i> 0</span>
# </div>
# </div>
# </div>
- # <div class="blog-excerpt">
- # <p>Happy 4th of July! Sign up for the London meetup at https://HackAcrossThePlanet.com &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Shop: ...
- # <a href="https://www.hak5.org/episodes/season-22/hak5-2217-bushveld-b-roll-hack-across-the-planet" class="readmore maincolor2 bordercolor2 bgcolor2hover ...
+ # <div class="item-content hidden">
+ # <p>The Yahoo breach was a lot worse than we thought, the Equifax ex-CEO sheds light on some questions, disqus was hacked, and Kaspersky is stuck in the middle of debates. All that coming up now on ThreatWire. Hak5 Product Launch Event! October 20th: https://www.hak5.org/rsvp &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Shop: http://www.hakshop.com Support: http://www.patreon.com/threatwire Subscribe: http://www.youtube.com/hak5 Our Site: http://www.hak5.org [&hellip;]</p>
# </div>
- # </div><!--/col6-->
- # </div><!--/row-->
# <div class="clearfix"></div>
# </div>
@@ -156,7 +140,9 @@ class Main:
xbmc.log("[ADDON] %s v%s (%s) debug mode, %s = %s" % (
ADDON, VERSION, DATE, "thumbnail_url", str(thumbnail_url)), xbmc.LOGDEBUG)
- title = episode.a['title']
+ pos_of_title_start = str(episode).find('title="') + len('title="')
+ pos_of_title_end = str(episode).find('"', pos_of_title_start)
+ title = str(episode)[pos_of_title_start:pos_of_title_end]
# Clean up title
try:
diff --git a/plugin.video.hak5/resources/lib/hak5_list_seasons.py b/plugin.video.hak5/resources/lib/hak5_list_seasons.py
index b0544aa..9b3388e 100644
--- a/plugin.video.hak5/resources/lib/hak5_list_seasons.py
+++ b/plugin.video.hak5/resources/lib/hak5_list_seasons.py
@@ -72,7 +72,8 @@ class Main:
# xbmc.log("[ADDON] %s v%s (%s) debug mode, %s = %s" % (
# ADDON, VERSION, DATE, "html_source", str(html_source)), xbmc.LOGDEBUG)
- seasons = soup.findAll('a', attrs={'href': re.compile("^" + HAK5SEASONSURLHTTPS)})
+ #<a href="https://www.hak5.org/category/episodes/season_1" data-ss1507745229="1">Season 1</a>
+ seasons = soup.findAll('a', attrs={'href': re.compile("^" + "https://www.hak5.org/category/episodes/season")})
xbmc.log("[ADDON] %s v%s (%s) debug mode, %s = %s" % (
ADDON, VERSION, DATE, "len(seasons)", str(len(seasons))), xbmc.LOGDEBUG)
diff --git a/plugin.video.hak5/resources/lib/hak5_main.py b/plugin.video.hak5/resources/lib/hak5_main.py
index 49575a6..af47c11 100644
--- a/plugin.video.hak5/resources/lib/hak5_main.py
+++ b/plugin.video.hak5/resources/lib/hak5_main.py
@@ -10,7 +10,7 @@ import xbmcgui
import xbmcplugin
import os
-from hak5_const import LANGUAGE, IMAGES_PATH, HAK5RECENTLYADDEDURL, HAK5SEASONSURLHTTP, \
+from hak5_const import LANGUAGE, IMAGES_PATH, HAK5RECENTLYADDEDURL, HAK5SEASONSURLHTTPS, \
HAKTIKRECENTLYADDEDURL, THREATWIRERECENTLYADDEDURL, TEKTHINGRECENTLYADDEDURL, PINEAPPLEUNIVERSITYRECENTLYADDEDURL, \
METASPLOITRECENTLYADDEDURL
#
@@ -39,7 +39,7 @@ class Main:
#
# Hak5 Seasons
#
- parameters = {"action": "list-seasons", "plugin_category": LANGUAGE(30302), "url": HAK5SEASONSURLHTTP,
+ parameters = {"action": "list-seasons", "plugin_category": LANGUAGE(30302), "url": HAK5SEASONSURLHTTPS,
"next_page_possible": "False"}
url = self.plugin_url + '?' + urllib.urlencode(parameters)
list_item = xbmcgui.ListItem(LANGUAGE(30302))
@@ -86,18 +86,6 @@ class Main:
xbmcplugin.addDirectoryItem(handle=self.plugin_handle, url=url, listitem=list_item, isFolder=is_folder)
#
- # Pinapple University Recently Added Episodes
- #
- parameters = {"action": "list-episodes", "plugin_category": LANGUAGE(30306), "url": PINEAPPLEUNIVERSITYRECENTLYADDEDURL,
- "next_page_possible": "False"}
- url = self.plugin_url + '?' + urllib.urlencode(parameters)
- list_item = xbmcgui.ListItem(LANGUAGE(30306))
- is_folder = True
- list_item.setArt({'fanart': os.path.join(IMAGES_PATH, 'fanart-blur.jpg')})
- list_item.setProperty('IsPlayable', 'false')
- xbmcplugin.addDirectoryItem(handle=self.plugin_handle, url=url, listitem=list_item, isFolder=is_folder)
-
- #
# Metasploit Recently Added Episodes
#
parameters = {"action": "list-episodes", "plugin_category": LANGUAGE(30307), "url": METASPLOITRECENTLYADDEDURL,