Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-alpha committed Jun 24, 2018
1 parent a15091c commit 2308cb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Contents/Code/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
TITLE = "FMoviesPlus"
VERSION = '0.69' # Release notation (x.y - where x is major and y is minor)
VERSION = '0.70' # Release notation (x.y - where x is major and y is minor)
TAG = ''
GITHUB_REPOSITORY = 'coder-alpha/FMoviesPlus.bundle'
PREFIX = "/video/fmoviesplus"
Expand Down
24 changes: 13 additions & 11 deletions Contents/Libraries/Shared/phantomjs/fmovies.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ page.onInitialized = function() {
delete window.callPhantom;
window.outerHeight = 1200;
window.outerWidth = 1600;
window.innerHeight = 1200;
window.innerWidth = 1600;
});
};
page.settings.userAgent = "mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/67.0.3396.87 safari/537.36";
page.settings.userAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36";

// thanks @skidank (https://forums.plex.tv/discussion/comment/1582115/#Comment_1582115)
page.onError = function(msg, trace) {
Expand All @@ -37,16 +35,20 @@ page.open(page_url, function(status) {

//page.includeJs('https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js', function() {
var info = page.evaluate(function() {

function GetIframeLink() {
var elms = document.getElementsByTagName("iframe");
for (var j = 0; j < elms.length; j++) {
if (elms[j].src != null && elms[j].src.length > 0) {
var txt = elms[j].src;
return txt;
try {
var elms = document.getElementById("player").getElementsByTagName("iframe");
for (var j = 0; j < elms.length; j++) {
var srctxt = elms[j].src;
if (srctxt != null && srctxt.length > 0) {
var txt = srctxt;
return txt;
}
}
return null;
} catch(err) {
return 'Exception: ' + err.message;
}
return null;
};

var spanID = GetIframeLink();
Expand All @@ -63,7 +65,7 @@ page.open(page_url, function(status) {

var myInfo = info.decoded_id;
if (myInfo == null || myInfo.length == 0 || myInfo.indexOf('Exception') > -1) {
console.log('ERROR: ID not found. ' + myInfo);
console.log('ERROR: Video not found. ' + myInfo);
} else {
var url = info.decoded_id;
console.log(url);
Expand Down

0 comments on commit 2308cb3

Please sign in to comment.