From a924c746ec5603ecea3d7bbb005818acf2bc5891 Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha Date: Sun, 4 Aug 2019 14:20:31 -0500 Subject: [PATCH 1/7] changed to einthusan new url address --- Contents/Code/__init__.py | 16 ++++++++-------- Contents/Code/common.py | 2 +- Contents/Code/einthusan.py | 12 ++++++------ Contents/Libraries/Shared/slimerjs/__init__.py | 2 +- .../Services/URL/CusEinthusan/ServiceCode.pys | 2 +- README.md | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index 49c864b..aa2f143 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -3,7 +3,7 @@ ###################################################################################### # -# Einthusan.com / Einthusan.tv +# Einthusan.com / Einthusan.ca # ###################################################################################### @@ -28,12 +28,12 @@ ICON_PREFS = "icon-prefs.png" ICON_LANG = "icon-lang.png" ICON_SOURCES = "icon-sources.png" -BASE_URL = "https://einthusan.tv" -SEARCH_URL = "https://einthusan.tv/search/" +BASE_URL = "https://einthusan.ca" +SEARCH_URL = "https://einthusan.ca/search/" PROXY_URL = "https://ssl-proxy.my-addr.org/myaddrproxy.php/" PROXY_PART = "/myaddrproxy.php/https/" PROXY_PART_REPLACE = "//" -PROXY_PART2 = "/myaddrproxy.php/https/einthusan.tv/" +PROXY_PART2 = "/myaddrproxy.php/https/einthusan.ca/" PROXY_PART2_REPLACE = "/" LAST_PROCESSED_URL = [] VideoURL = {} @@ -499,7 +499,7 @@ def initSlimerJS(): if python_dir == None: python_dir = "" - res = slimerjs.einthusan(python_dir=python_dir, firefox_dir=firefox_dir, url="https://einthusan.tv") + res = slimerjs.einthusan(python_dir=python_dir, firefox_dir=firefox_dir, url="https://einthusan.ca") if res == "": res = "Success" Log("Initialized SlimerJS: " + res) @@ -581,7 +581,7 @@ def AllAvailableSources2(furl, title, summary, thumb, year, rating, art, locatio vidpath = furl.split('.tv/')[1] for idx in EINTHUSAN_SERVER_INFO[location]["Servers"]: - furl = ("https://s" + str(idx+SERVER_OFFSET[0]) + ".einthusan.tv/" + vidpath) + furl = ("https://s" + str(idx+SERVER_OFFSET[0]) + ".einthusan.ca/" + vidpath) ret_code = GetHttpStatus(url=furl) if ret_code == "200": oc.add(VideoClipObject( @@ -607,14 +607,14 @@ def AvailableSourceFrom(furl, location, **kwargs): except: choice_str = '1' - url = ("https://s" + choice_str + ".einthusan.tv/" + vidpath) + url = ("https://s" + choice_str + ".einthusan.ca/" + vidpath) ret_code = GetHttpStatus(url=url) return url, choice_str, ret_code @route(PREFIX + "/DetermineCurrentServer") def DetermineCurrentServer(furl, location, **kwargs): - server_n = furl.split('.einthusan.tv')[0].strip('https://s') + server_n = furl.split('.einthusan.ca')[0].strip('https://s') del SERVER_OFFSET[:] if int(server_n) > 100: diff --git a/Contents/Code/common.py b/Contents/Code/common.py index 2ed1a1b..9fbf664 100644 --- a/Contents/Code/common.py +++ b/Contents/Code/common.py @@ -13,7 +13,7 @@ # SSL Web Proxy PROXY_URL = "https://ssl-proxy.my-addr.org/myaddrproxy.php/" -PROXY_PART1 = "/myaddrproxy.php/https/einthusan.tv/" +PROXY_PART1 = "/myaddrproxy.php/https/einthusan.ca/" PROXY_PART1_REPLACE = "/" PROXY_PART2A = "/myaddrproxy.php/https/" PROXY_PART2B = "/myaddrproxy.php/http/" diff --git a/Contents/Code/einthusan.py b/Contents/Code/einthusan.py index fc10096..9906901 100644 --- a/Contents/Code/einthusan.py +++ b/Contents/Code/einthusan.py @@ -86,7 +86,7 @@ def parseUrl(url): def requestWithHeaders(url, output=None): cookieJar = cookielib.LWPCookieJar() - headers=[('Origin','https://einthusan.tv'),('Referer','https://einthusan.tv/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] + headers=[('Origin','https://einthusan.ca'),('Referer','https://einthusan.ca/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] htm=request(url,headers=headers,cookieJar=cookieJar,output=output) return htm @@ -96,9 +96,9 @@ def GetEinthusanData(url, debug=False): id,lang = parseUrl(url) cookieJar = cookielib.LWPCookieJar() - headers=[('Origin','https://einthusan.tv'),('Referer','https://einthusan.tv/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] - mainurl='https://einthusan.tv/movie/watch/%s/?lang=%s'%(id,lang) - mainurlajax='https://einthusan.tv/ajax/movie/watch/%s/?lang=%s'%(id,lang) + headers=[('Origin','https://einthusan.ca'),('Referer','https://einthusan.ca/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] + mainurl='https://einthusan.ca/movie/watch/%s/?lang=%s'%(id,lang) + mainurlajax='https://einthusan.ca/ajax/movie/watch/%s/?lang=%s'%(id,lang) htm=request(mainurl,headers=headers,cookieJar=cookieJar) @@ -123,12 +123,12 @@ def GetEinthusanData(url, debug=False): def Test(): - url = 'https://einthusan.tv/movie/watch/9097/?lang=hindi' + url = 'https://einthusan.ca/movie/watch/9097/?lang=hindi' d = GetEinthusanData(url=url,) d = json.loads(d) print (d) def Test2(): - url = 'https://einthusan.tv' + url = 'https://einthusan.ca' d = requestWithHeaders(url=url) print (d) \ No newline at end of file diff --git a/Contents/Libraries/Shared/slimerjs/__init__.py b/Contents/Libraries/Shared/slimerjs/__init__.py index d7357a7..f93ae17 100644 --- a/Contents/Libraries/Shared/slimerjs/__init__.py +++ b/Contents/Libraries/Shared/slimerjs/__init__.py @@ -62,6 +62,6 @@ def einthusan(python_dir, firefox_dir, url, debug=False): return "error-fail - code execution error - " + str(err) + " " + str(output) + " " + str(file_cmd) def test(): - print einthusan("/Applications/Firefox.app/Contents/MacOS/firefox","https://einthusan.tv/movie/watch/7757/?lang=hindi", debug=True) + print einthusan("/Applications/Firefox.app/Contents/MacOS/firefox","https://einthusan.ca/movie/watch/7757/?lang=hindi", debug=True) #test() \ No newline at end of file diff --git a/Contents/Services/URL/CusEinthusan/ServiceCode.pys b/Contents/Services/URL/CusEinthusan/ServiceCode.pys index 233ed6c..90af6c6 100644 --- a/Contents/Services/URL/CusEinthusan/ServiceCode.pys +++ b/Contents/Services/URL/CusEinthusan/ServiceCode.pys @@ -2,7 +2,7 @@ """Einthusan.com ServiceCode""" -BASE_URL = 'https://einthusan.tv' +BASE_URL = 'https://einthusan.ca' USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0' HTTP.Headers['User-Agent'] = USER_AGENT HTTP.Headers['Referer'] = BASE_URL diff --git a/README.md b/README.md index a54432c..ef395c2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Einthusan.bundle =================== -This is a plugin that creates a new channel in Plex Media Server to view content indexed by the website einthusan.tv +This is a plugin that creates a new channel in Plex Media Server to view content indexed by the website einthusan.ca [Plex Support thread] (https://forums.plex.tv/index.php/topic/165072-rel-einthusan-channel-indian-movies/) From a59cda69f2ecd2eeae6f1a5e1d53556fce95f314 Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha Date: Sun, 4 Aug 2019 22:19:45 -0500 Subject: [PATCH 2/7] changed to einthusan new CDN url --- Contents/Code/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index aa2f143..486adcf 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -578,10 +578,10 @@ def AllAvailableSources(furl, title, summary, thumb, year, rating, art, **kwargs def AllAvailableSources2(furl, title, summary, thumb, year, rating, art, location, **kwargs): oc = ObjectContainer(title1 = unicode(title), art=thumb) - vidpath = furl.split('.tv/')[1] + vidpath = furl.split('.io/')[1] for idx in EINTHUSAN_SERVER_INFO[location]["Servers"]: - furl = ("https://s" + str(idx+SERVER_OFFSET[0]) + ".einthusan.ca/" + vidpath) + furl = ("https://cdn" + str(idx+SERVER_OFFSET[0]) + ".einthusan.io/" + vidpath) ret_code = GetHttpStatus(url=furl) if ret_code == "200": oc.add(VideoClipObject( @@ -602,19 +602,19 @@ def AvailableSourceFrom(furl, location, **kwargs): location = 'San Jose' try: - vidpath = furl.split('.tv/')[1] + vidpath = furl.split('.io/')[1] choice_str = str(random.choice(EINTHUSAN_SERVER_INFO[location]["Servers"]) + SERVER_OFFSET[0]) except: choice_str = '1' - url = ("https://s" + choice_str + ".einthusan.ca/" + vidpath) + url = ("https://cdn" + choice_str + ".einthusan.io/" + vidpath) ret_code = GetHttpStatus(url=url) return url, choice_str, ret_code @route(PREFIX + "/DetermineCurrentServer") def DetermineCurrentServer(furl, location, **kwargs): - server_n = furl.split('.einthusan.ca')[0].strip('https://s') + server_n = furl.split('.einthusan.io')[0].strip('https://cdn') del SERVER_OFFSET[:] if int(server_n) > 100: @@ -707,7 +707,7 @@ def Bookmarks(title, **kwargs): url = Dict[each] #Log("url-----------" + url) if url.find(TITLE.lower()) != -1 and 'http' in url and '.mp4' not in url: - if 'einthusan.com' in url: + if 'einthusan.ca' in url: url = GetRedirector(url) Dict[each] = url oc.add(DirectoryObject( From c6b83cb25ef8868436d44c7fccecca6674e02cac Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha Date: Thu, 8 Aug 2019 00:37:25 -0500 Subject: [PATCH 3/7] new cdn server updated --- Contents/Code/__init__.py | 43 +++++++------------------------ Contents/DefaultPrefs.json | 53 +++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 35 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index 486adcf..dfcd2bc 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -37,7 +37,7 @@ PROXY_PART2_REPLACE = "/" LAST_PROCESSED_URL = [] VideoURL = {} -EINTHUSAN_SERVERS = ["Dallas","Washington","San Jose","Somerville","Toronto","London","Sydney"] +EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles"] EINTHUSAN_SERVER_INFO = {} SLIMERJS_INIT = [] @@ -645,47 +645,22 @@ def AddSourceInfo(): AUS_FLAG = "icon-aus.png" EINTHUSAN_SERVER_INFO["Dallas"] = {} - EINTHUSAN_SERVER_INFO["Dallas"]["Servers"]=[23,24,25,29,30,31,35,36,37,38,45] + EINTHUSAN_SERVER_INFO["Dallas"]["Servers"]=[2] EINTHUSAN_SERVER_INFO["Dallas"]["Country"]="US" EINTHUSAN_SERVER_INFO["Dallas"]["State"]="TX" EINTHUSAN_SERVER_INFO["Dallas"]["Flag"]=US_FLAG EINTHUSAN_SERVER_INFO["Washington"] = {} - EINTHUSAN_SERVER_INFO["Washington"]["Servers"]=[1,2,3,4,5,6,7,8,9,10,11,13,41,44] + EINTHUSAN_SERVER_INFO["Washington"]["Servers"]=[1] EINTHUSAN_SERVER_INFO["Washington"]["Country"]="US" EINTHUSAN_SERVER_INFO["Washington"]["State"]="D.C." EINTHUSAN_SERVER_INFO["Washington"]["Flag"]=US_FLAG - EINTHUSAN_SERVER_INFO["San Jose"] = {} - EINTHUSAN_SERVER_INFO["San Jose"]["Servers"]=[19,20,21,22,46] - EINTHUSAN_SERVER_INFO["San Jose"]["Country"]="US" - EINTHUSAN_SERVER_INFO["San Jose"]["State"]="CA" - EINTHUSAN_SERVER_INFO["San Jose"]["Flag"]=US_FLAG - - EINTHUSAN_SERVER_INFO["Somerville"] = {} - EINTHUSAN_SERVER_INFO["Somerville"]["Servers"]=[12] - EINTHUSAN_SERVER_INFO["Somerville"]["Country"]="US" - EINTHUSAN_SERVER_INFO["Somerville"]["State"]="MA" - EINTHUSAN_SERVER_INFO["Somerville"]["Flag"]=US_FLAG - - EINTHUSAN_SERVER_INFO["Toronto"] = {} - EINTHUSAN_SERVER_INFO["Toronto"]["Servers"]=[26,27] - EINTHUSAN_SERVER_INFO["Toronto"]["Country"]="Canada" - EINTHUSAN_SERVER_INFO["Toronto"]["State"]="" - EINTHUSAN_SERVER_INFO["Toronto"]["Flag"]=CAN_FLAG - - EINTHUSAN_SERVER_INFO["London"] = {} - EINTHUSAN_SERVER_INFO["London"]["Servers"]=[14,15,16,17,18,32,33,39,40,42] - EINTHUSAN_SERVER_INFO["London"]["Country"]="UK" - EINTHUSAN_SERVER_INFO["London"]["State"]="" - EINTHUSAN_SERVER_INFO["London"]["Flag"]=UK_FLAG - - EINTHUSAN_SERVER_INFO["Sydney"] = {} - EINTHUSAN_SERVER_INFO["Sydney"]["Servers"]=[28,34,43] - EINTHUSAN_SERVER_INFO["Sydney"]["Country"]="Australia" - EINTHUSAN_SERVER_INFO["Sydney"]["State"]="" - EINTHUSAN_SERVER_INFO["Sydney"]["Flag"]=AUS_FLAG - + EINTHUSAN_SERVER_INFO["Los Angeles"] = {} + EINTHUSAN_SERVER_INFO["Los Angeles"]["Servers"] = [3] + EINTHUSAN_SERVER_INFO["Los Angeles"]["Country"] = "US" + EINTHUSAN_SERVER_INFO["Los Angeles"]["State"] = "CA" + EINTHUSAN_SERVER_INFO["Los Angeles"]["Flag"] = US_FLAG def find_between( s, first, last ): try: @@ -909,4 +884,4 @@ def GetHttpStatus(url, **kwargs): if Prefs['use_debug']: Log('Error > GetHttpStatus: ' + str(e)) Log(url +' : HTTPResponse = '+ resp) - return resp \ No newline at end of file + return resp diff --git a/Contents/DefaultPrefs.json b/Contents/DefaultPrefs.json index 566b4fe..699fe19 100644 --- a/Contents/DefaultPrefs.json +++ b/Contents/DefaultPrefs.json @@ -1 +1,52 @@ -[ { "id": "langPref", "label": "Language", "type": "enum", "values": ["hindi","tamil","telugu","malayalam","kannada","bengali","marathi","punjabi"], "default": "hindi" }, { "id": "locationPref", "label": "Preferred Location", "type": "enum", "values": ["Dallas","Washington","San Jose","Somerville","Toronto","London","Sydney"], "default": "Washington" }, { "id": "use_https_alt", "label": "Use Alternate SSL/TLS", "type": "bool", "default": "false" }, { "id": "use_proxy", "label": "Use proxy for connection", "type": "bool", "default": "false" }, { "id": "use_slimerjs", "label": "Use SlimerJS (define paths below)", "type": "bool", "default": "false" }, { "id": "python_dir", "label": "Python directory (for Linux only)", "type": "text", "default": "/usr/local/bin/python" }, { "id": "firefox_dir", "label": "Firefox directory (eg. C:\\Program Files (x86)\\Mozilla Firefox\\)", "type": "text", "default": "" }, { "id": "use_debug", "label": "Enable Debug Mode", "type": "bool", "default": "false" } ] \ No newline at end of file +[ + { + "id": "langPref", + "label": "Language", + "type": "enum", + "values": ["hindi","tamil","telugu","malayalam","kannada","bengali","marathi","punjabi"], + "default": "hindi" + }, + { + "id": "locationPref", + "label": "Preferred Location", + "type": "enum", + "values": ["Dallas","Washington","Los Angeles"], + "default": "Washington" + }, + { + "id": "use_https_alt", + "label": "Use Alternate SSL/TLS", + "type": "bool", + "default": "false" + }, + { + "id": "use_proxy", + "label": "Use proxy for connection", + "type": "bool", + "default": "false" + }, + { + "id": "use_slimerjs", + "label": "Use SlimerJS (define paths below)", + "type": "bool", + "default": "false" + }, + { + "id": "python_dir", + "label": "Python directory (for Linux only)", + "type": "text", + "default": "/usr/local/bin/python" + }, + { + "id": "firefox_dir", + "label": "Firefox directory (eg. C:\\Program Files (x86)\\Mozilla Firefox\\)", + "type": "text", + "default": "" + }, + { + "id": "use_debug", + "label": "Enable Debug Mode", + "type": "bool", + "default": "false" + } +] \ No newline at end of file From eefa83eb45745b4fd7c613b20f321d44e20ae4d0 Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha Date: Thu, 29 Aug 2019 10:49:09 -0500 Subject: [PATCH 4/7] add london server --- Contents/Code/__init__.py | 8 +++++++- Contents/DefaultPrefs.json | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index dfcd2bc..b52121d 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -37,7 +37,7 @@ PROXY_PART2_REPLACE = "/" LAST_PROCESSED_URL = [] VideoURL = {} -EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles"] +EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles","London"] EINTHUSAN_SERVER_INFO = {} SLIMERJS_INIT = [] @@ -661,6 +661,12 @@ def AddSourceInfo(): EINTHUSAN_SERVER_INFO["Los Angeles"]["Country"] = "US" EINTHUSAN_SERVER_INFO["Los Angeles"]["State"] = "CA" EINTHUSAN_SERVER_INFO["Los Angeles"]["Flag"] = US_FLAG + + EINTHUSAN_SERVER_INFO["London"] = {} + EINTHUSAN_SERVER_INFO["London"]["Servers"] = [4] + EINTHUSAN_SERVER_INFO["London"]["Country"] = "UK" + EINTHUSAN_SERVER_INFO["London"]["State"] = "" + EINTHUSAN_SERVER_INFO["London"]["Flag"] = UK_FLAG def find_between( s, first, last ): try: diff --git a/Contents/DefaultPrefs.json b/Contents/DefaultPrefs.json index 699fe19..50c15c4 100644 --- a/Contents/DefaultPrefs.json +++ b/Contents/DefaultPrefs.json @@ -10,7 +10,7 @@ "id": "locationPref", "label": "Preferred Location", "type": "enum", - "values": ["Dallas","Washington","Los Angeles"], + "values": ["Dallas","Washington","Los Angeles","London"], "default": "Washington" }, { @@ -49,4 +49,4 @@ "type": "bool", "default": "false" } -] \ No newline at end of file +] From 1257f925d4a320c6a977b04128bfac2e2ea3b7e5 Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha Date: Mon, 2 Sep 2019 19:30:59 -0500 Subject: [PATCH 5/7] Revert "add london server" This reverts commit eefa83eb45745b4fd7c613b20f321d44e20ae4d0. --- Contents/Code/__init__.py | 8 +------- Contents/DefaultPrefs.json | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index b52121d..dfcd2bc 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -37,7 +37,7 @@ PROXY_PART2_REPLACE = "/" LAST_PROCESSED_URL = [] VideoURL = {} -EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles","London"] +EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles"] EINTHUSAN_SERVER_INFO = {} SLIMERJS_INIT = [] @@ -661,12 +661,6 @@ def AddSourceInfo(): EINTHUSAN_SERVER_INFO["Los Angeles"]["Country"] = "US" EINTHUSAN_SERVER_INFO["Los Angeles"]["State"] = "CA" EINTHUSAN_SERVER_INFO["Los Angeles"]["Flag"] = US_FLAG - - EINTHUSAN_SERVER_INFO["London"] = {} - EINTHUSAN_SERVER_INFO["London"]["Servers"] = [4] - EINTHUSAN_SERVER_INFO["London"]["Country"] = "UK" - EINTHUSAN_SERVER_INFO["London"]["State"] = "" - EINTHUSAN_SERVER_INFO["London"]["Flag"] = UK_FLAG def find_between( s, first, last ): try: diff --git a/Contents/DefaultPrefs.json b/Contents/DefaultPrefs.json index 50c15c4..699fe19 100644 --- a/Contents/DefaultPrefs.json +++ b/Contents/DefaultPrefs.json @@ -10,7 +10,7 @@ "id": "locationPref", "label": "Preferred Location", "type": "enum", - "values": ["Dallas","Washington","Los Angeles","London"], + "values": ["Dallas","Washington","Los Angeles"], "default": "Washington" }, { @@ -49,4 +49,4 @@ "type": "bool", "default": "false" } -] +] \ No newline at end of file From d115cb8a2606183fc561ab741a6f2b527eea4653 Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha Date: Mon, 2 Sep 2019 19:42:13 -0500 Subject: [PATCH 6/7] [fix encoding] add london server --- Contents/Code/__init__.py | 8 +++++++- Contents/DefaultPrefs.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index dfcd2bc..611fc52 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -37,7 +37,7 @@ PROXY_PART2_REPLACE = "/" LAST_PROCESSED_URL = [] VideoURL = {} -EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles"] +EINTHUSAN_SERVERS = ["Dallas","Washington","Los Angeles","London"] EINTHUSAN_SERVER_INFO = {} SLIMERJS_INIT = [] @@ -662,6 +662,12 @@ def AddSourceInfo(): EINTHUSAN_SERVER_INFO["Los Angeles"]["State"] = "CA" EINTHUSAN_SERVER_INFO["Los Angeles"]["Flag"] = US_FLAG + EINTHUSAN_SERVER_INFO["London"] = {} + EINTHUSAN_SERVER_INFO["London"]["Servers"] = [4] + EINTHUSAN_SERVER_INFO["London"]["Country"] = "UK" + EINTHUSAN_SERVER_INFO["London"]["State"] = "" + EINTHUSAN_SERVER_INFO["London"]["Flag"] = UK_FLAG + def find_between( s, first, last ): try: start = s.rindex( first ) + len( first ) diff --git a/Contents/DefaultPrefs.json b/Contents/DefaultPrefs.json index 699fe19..2837a94 100644 --- a/Contents/DefaultPrefs.json +++ b/Contents/DefaultPrefs.json @@ -10,7 +10,7 @@ "id": "locationPref", "label": "Preferred Location", "type": "enum", - "values": ["Dallas","Washington","Los Angeles"], + "values": ["Dallas","Washington","Los Angeles","London"], "default": "Washington" }, { From 4c3b36647ffa68650a71d1d35033a233be88d9fa Mon Sep 17 00:00:00 2001 From: Kabindra Shrestha <937191+kabindra@users.noreply.github.com> Date: Sat, 21 Mar 2020 14:47:06 -0500 Subject: [PATCH 7/7] domain moved from .ca to .tv --- Contents/Code/__init__.py | 12 ++++++------ Contents/Code/common.py | 2 +- Contents/Code/einthusan.py | 12 ++++++------ Contents/Libraries/Shared/slimerjs/__init__.py | 2 +- Contents/Services/URL/CusEinthusan/ServiceCode.pys | 2 +- README.md | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index 611fc52..871a005 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -3,7 +3,7 @@ ###################################################################################### # -# Einthusan.com / Einthusan.ca +# Einthusan.com / Einthusan.tv # ###################################################################################### @@ -28,12 +28,12 @@ ICON_PREFS = "icon-prefs.png" ICON_LANG = "icon-lang.png" ICON_SOURCES = "icon-sources.png" -BASE_URL = "https://einthusan.ca" -SEARCH_URL = "https://einthusan.ca/search/" +BASE_URL = "https://einthusan.tv" +SEARCH_URL = "https://einthusan.tv/search/" PROXY_URL = "https://ssl-proxy.my-addr.org/myaddrproxy.php/" PROXY_PART = "/myaddrproxy.php/https/" PROXY_PART_REPLACE = "//" -PROXY_PART2 = "/myaddrproxy.php/https/einthusan.ca/" +PROXY_PART2 = "/myaddrproxy.php/https/einthusan.tv/" PROXY_PART2_REPLACE = "/" LAST_PROCESSED_URL = [] VideoURL = {} @@ -499,7 +499,7 @@ def initSlimerJS(): if python_dir == None: python_dir = "" - res = slimerjs.einthusan(python_dir=python_dir, firefox_dir=firefox_dir, url="https://einthusan.ca") + res = slimerjs.einthusan(python_dir=python_dir, firefox_dir=firefox_dir, url="https://einthusan.tv") if res == "": res = "Success" Log("Initialized SlimerJS: " + res) @@ -688,7 +688,7 @@ def Bookmarks(title, **kwargs): url = Dict[each] #Log("url-----------" + url) if url.find(TITLE.lower()) != -1 and 'http' in url and '.mp4' not in url: - if 'einthusan.ca' in url: + if 'einthusan.tv' in url: url = GetRedirector(url) Dict[each] = url oc.add(DirectoryObject( diff --git a/Contents/Code/common.py b/Contents/Code/common.py index 9fbf664..2ed1a1b 100644 --- a/Contents/Code/common.py +++ b/Contents/Code/common.py @@ -13,7 +13,7 @@ # SSL Web Proxy PROXY_URL = "https://ssl-proxy.my-addr.org/myaddrproxy.php/" -PROXY_PART1 = "/myaddrproxy.php/https/einthusan.ca/" +PROXY_PART1 = "/myaddrproxy.php/https/einthusan.tv/" PROXY_PART1_REPLACE = "/" PROXY_PART2A = "/myaddrproxy.php/https/" PROXY_PART2B = "/myaddrproxy.php/http/" diff --git a/Contents/Code/einthusan.py b/Contents/Code/einthusan.py index 9906901..fc10096 100644 --- a/Contents/Code/einthusan.py +++ b/Contents/Code/einthusan.py @@ -86,7 +86,7 @@ def parseUrl(url): def requestWithHeaders(url, output=None): cookieJar = cookielib.LWPCookieJar() - headers=[('Origin','https://einthusan.ca'),('Referer','https://einthusan.ca/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] + headers=[('Origin','https://einthusan.tv'),('Referer','https://einthusan.tv/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] htm=request(url,headers=headers,cookieJar=cookieJar,output=output) return htm @@ -96,9 +96,9 @@ def GetEinthusanData(url, debug=False): id,lang = parseUrl(url) cookieJar = cookielib.LWPCookieJar() - headers=[('Origin','https://einthusan.ca'),('Referer','https://einthusan.ca/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] - mainurl='https://einthusan.ca/movie/watch/%s/?lang=%s'%(id,lang) - mainurlajax='https://einthusan.ca/ajax/movie/watch/%s/?lang=%s'%(id,lang) + headers=[('Origin','https://einthusan.tv'),('Referer','https://einthusan.tv/movie/browse/?lang=hindi'),('User-Agent',USER_AGENT)] + mainurl='https://einthusan.tv/movie/watch/%s/?lang=%s'%(id,lang) + mainurlajax='https://einthusan.tv/ajax/movie/watch/%s/?lang=%s'%(id,lang) htm=request(mainurl,headers=headers,cookieJar=cookieJar) @@ -123,12 +123,12 @@ def GetEinthusanData(url, debug=False): def Test(): - url = 'https://einthusan.ca/movie/watch/9097/?lang=hindi' + url = 'https://einthusan.tv/movie/watch/9097/?lang=hindi' d = GetEinthusanData(url=url,) d = json.loads(d) print (d) def Test2(): - url = 'https://einthusan.ca' + url = 'https://einthusan.tv' d = requestWithHeaders(url=url) print (d) \ No newline at end of file diff --git a/Contents/Libraries/Shared/slimerjs/__init__.py b/Contents/Libraries/Shared/slimerjs/__init__.py index f93ae17..d7357a7 100644 --- a/Contents/Libraries/Shared/slimerjs/__init__.py +++ b/Contents/Libraries/Shared/slimerjs/__init__.py @@ -62,6 +62,6 @@ def einthusan(python_dir, firefox_dir, url, debug=False): return "error-fail - code execution error - " + str(err) + " " + str(output) + " " + str(file_cmd) def test(): - print einthusan("/Applications/Firefox.app/Contents/MacOS/firefox","https://einthusan.ca/movie/watch/7757/?lang=hindi", debug=True) + print einthusan("/Applications/Firefox.app/Contents/MacOS/firefox","https://einthusan.tv/movie/watch/7757/?lang=hindi", debug=True) #test() \ No newline at end of file diff --git a/Contents/Services/URL/CusEinthusan/ServiceCode.pys b/Contents/Services/URL/CusEinthusan/ServiceCode.pys index 90af6c6..233ed6c 100644 --- a/Contents/Services/URL/CusEinthusan/ServiceCode.pys +++ b/Contents/Services/URL/CusEinthusan/ServiceCode.pys @@ -2,7 +2,7 @@ """Einthusan.com ServiceCode""" -BASE_URL = 'https://einthusan.ca' +BASE_URL = 'https://einthusan.tv' USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0' HTTP.Headers['User-Agent'] = USER_AGENT HTTP.Headers['Referer'] = BASE_URL diff --git a/README.md b/README.md index ef395c2..a54432c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Einthusan.bundle =================== -This is a plugin that creates a new channel in Plex Media Server to view content indexed by the website einthusan.ca +This is a plugin that creates a new channel in Plex Media Server to view content indexed by the website einthusan.tv [Plex Support thread] (https://forums.plex.tv/index.php/topic/165072-rel-einthusan-channel-indian-movies/)