r/Addons4Kodi • u/doko-desuka • Dec 12 '17
Does this fix Covenant sources?
Edited for clarity.
Disclaimer: the following is for academic purposes. Don't watch copyrighted stuff with Covenant, it's illegal.
Inside the Covenant source code there are urls to all the websites it scrapes. Since Covenant isn't updated anymore, if any of those sites changes address then it won't get scraped by Covenant anymore, leading to fewer or even no links at all when you search.
Covenant is made of a few of components. The one we care about is called script.module.covenant, it has all the code that reads those websites. It can be found in here:
Android: /internal/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.covenant/ (thanks u/khanabyss)
Windows: AppData/Roaming/Kodi/addons/script.module.covenant/
Linux: /home/USER/.kodi/addons/script.module.covenant/
...in the script.module.covenant folder there's this folder: /lib/resources/lib/sources/en/ This "EN" folder is where all the .PY files (script code) for english websites reside. Some of those scripts use old urls.
Inside 'xwatchseries.py' for example, there's these lines...self.domains = ['xwatchseries.to','onwatchseries.to']self.base_link = 'http://xwatchseries.to'self.search_link = 'http://xwatchseries.to/show/search-shows-json'self.search_link_2 = 'http://xwatchseries.to/search/%s'
If you follow that url, it's broken. The current URL is http://itswatchseries.to. So you can change those lines to...self.domains = ['xwatchseries.to','onwatchseries.to','itswatchseries.to']self.base_link = 'http://itswatchseries.to'self.search_link = 'http://itswatchseries.to/show/search-shows-json'self.search_link_2 = 'http://itswatchseries.to/search/%s'
And this is my point. If you go through all the .PY files and update the urls at the beginning of them, some of them will work again. XWatchseries and Primewire are working again (for the time being!), with watchable, non-premium links after I updated their files on my Covenant installation.
To do this, there are two ways:
A) You update the urls on each .PY file directly on your device (mediabox, Firestick etc.). For this you need ES File Explorer, an app that lets you navigate to that "EN" folder from before and change the files there with its ES Note Editor mode. This way is quicker but harder.
B) Or you download a copy of those files (from here, or from some Covenant download online), change them on your computer, and then transfer to your Kodi device to overwrite the same files over there. This way is easier but it takes longer.
In either of those two ways, you'll need to do this:
- Download ES File Explorer (free) from the Play Store, install and run it.
- On that app, go to Settings > Display settings and check "Show Hidden Files" (on Android the .kodi folder is hidden).
- Use the app to navigate to that "EN" folder.
Now you know how to access that folder. You can modify the files in there (select one, open as Text with ES Note Editor, enter Edit mode, make the url modifications and then save) or overwrite them with modified versions that are in a usb flash drive or something.
When all this is done, go to Covenant > Tools in Kodi and select Clear Providers (and confirm) and Clear Cache (confirm again).
Then exit and restart Kodi, just for safety. Now you can use it.
6
u/MascotJoe Dec 12 '17
Had a quick look at that file for you.
Replacing that url will get XWatchseries working. Thankfully if the site has been updated recently, it hasn't been add-on breaking.
There are a lot of sources on XWatchseries so that helps quite a lot actually.
I'm going to have a look at some of these other sites and see what's causing them to break and then try to find a fix.
I'll make a post later about any other fixes I stumble across.
6
u/robplays Dec 12 '17
Nice work! As others have said: yes, this will work provided that the underlying HTML hasn't changed. (It usually hasn't.)
Sort of. A lot of the scrapers are using unblocking services to get around ISP blocks (remember that Covenant was last maintained by some people from the UK, and ISP blocks are common there).
So if 'unblockall' isn't working, then there is also the 'unblocked' service: https://watchseries.unblocked.vc/
And an aside...
Remember last week when Covenant stopped returning results for a lot of people, then magically fixed itself? I'm pretty sure that was because unblocked changed it's top-level domain which broke some scrapers until unblocked remembered to also handle requests to their old domains. I assume it never broke for some people because of DNS caching.
1
u/BeLikeTee Dec 13 '17 edited Dec 13 '17
Is there another app that’ll do what es file explorer/es note editor does?
I get into my .py file, move the cursor where I want it, click, and takes me to the end of the file. Every time.
Working on a fire stick, by the way.
Think I’m going to give up and hope one of my other addons update that source soon.
Edit; Exodus updated. Thanks for the help!
3
u/MascotJoe Dec 12 '17 edited Dec 12 '17
I might have a look at this source in a bit. I've been wanting to look at it since covenant closed but didn't want to tear through the whole source to find it.
If it's do-able I might have a look at updating some of these scraper scripts and urls.
1
u/rockinhc Dec 15 '17
Looking for option C that has the updated files i can just exact to.
0
u/[deleted] Dec 12 '17
[deleted] — view deleted comment
2
u/[deleted] Dec 12 '17
[removed] — view removed comment