lambdascrapers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

myprojectfreetv.py 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # -*- coding: UTF-8 -*-
  2. # -Cleaned and Checked on 10-10-2018 by JewBMX in Yoda.
  3. import re,urllib,urlparse
  4. from resources.lib.modules import cleantitle
  5. from resources.lib.modules import client
  6. from resources.lib.modules import proxy
  7. class source:
  8. def __init__(self):
  9. self.priority = 1
  10. self.language = ['en']
  11. self.domains = ['my-project-free.tv']
  12. self.base_link = 'https://my-project-free.tv' #https://www8.project-free-tv.ag
  13. self.search_link = '/episode/%s-season-%s-episode-%s'
  14. def tvshow(self, imdb, tvdb, tvshowtitle, localtvshowtitle, aliases, year):
  15. try:
  16. clean_title = cleantitle.geturl(tvshowtitle)
  17. url = clean_title
  18. return url
  19. except:
  20. return
  21. def episode(self, url, imdb, tvdb, title, premiered, season, episode):
  22. try:
  23. if not url: return
  24. tvshowtitle = url
  25. url = self.base_link + self.search_link % (tvshowtitle, int(season), int(episode))
  26. return url
  27. except:
  28. return
  29. def sources(self, url, hostDict, hostprDict):
  30. try:
  31. sources = []
  32. r = client.request(url)
  33. try:
  34. data = re.compile("callvalue\('.+?','.+?','(.+?)://(.+?)/(.+?)'\)",re.DOTALL).findall(r)
  35. for http,host,url in data:
  36. url = '%s://%s/%s' % (http,host,url)
  37. sources.append({
  38. 'source': host,
  39. 'quality': 'SD',
  40. 'language': 'en',
  41. 'url': url,
  42. 'direct': False,
  43. 'debridonly': False
  44. })
  45. except:
  46. pass
  47. return sources
  48. except Exception:
  49. return
  50. def resolve(self, url):
  51. return url