diff --git a/Contents/Info.plist b/Contents/Info.plist index be7226a..1b4a50b 100644 --- a/Contents/Info.plist +++ b/Contents/Info.plist @@ -5,7 +5,7 @@ CFBundleIdentifier com.plexapp.plugins.mytf1 CFBundleVersion - 1.2.0 + 1.2.1 PlexFrameworkVersion 2 PlexClientPlatforms diff --git a/Contents/Services/URL/TF1/ServiceCode.pys b/Contents/Services/URL/TF1/ServiceCode.pys index e27c140..d2d6535 100644 --- a/Contents/Services/URL/TF1/ServiceCode.pys +++ b/Contents/Services/URL/TF1/ServiceCode.pys @@ -8,17 +8,18 @@ def MetadataObjectForURL(url): html = HTML.ElementFromString(get_page(url)) - container = html.xpath('//div[contains(@id, "contentPlayer")]/div/div/div/div[contains(@class, "container")]')[0] + section = html.xpath('//section[contains(@id, "content_video")]')[0] + player = section.xpath('//div[contains(@id, "player_video")]/div[contains(@id, "contentPlayer")]/div/div/div[contains(@class, "container")]')[0] - title = container.xpath('./div[contains(@class, "content")]/h1[contains(@class, "title")]/text()')[0] - summary = container.xpath('./div[contains(@class, "content")]/div[contains(@class, "description")]/p/text()')[0] - thumb = 'http:' + container.xpath('./div[contains(@class, "iframe")]/meta[contains(@itemprop, "thumbnailUrl")]/@content')[0] + title = section.xpath('./div[contains(@class, "description_container")]/article/span[contains(@class, "title")]/text()')[0] + summary = section.xpath('./div[contains(@class, "description_container")]/article/div[contains(@class, "description")]/p/text()')[0] + thumb = 'http:' + player.xpath('./div[contains(@class, "iframe")]/meta[contains(@itemprop, "thumbnailUrl")]/@content')[0] try: - duration = int(container.xpath('./div[contains(@class, "iframe")]/meta[contains(@itemprop, "duration")]/@content')[0]) * 1000 + duration = int(player.xpath('./div[contains(@class, "iframe")]/meta[contains(@itemprop, "duration")]/@content')[0]) * 1000 except: duration = None try: - oaa = Datetime.ParseDate(container.xpath('./div[contains(@class, "iframe")]/meta[contains(@itemprop, "uploadDate")]/@content')[0]) + oaa = Datetime.ParseDate(player.xpath('./div[contains(@class, "iframe")]/meta[contains(@itemprop, "uploadDate")]/@content')[0]) except: oaa = None