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.

default.py 4.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import urlparse
  2. from lambdascrapers.modules import control
  3. from lambdascrapers import providerSources, providerNames
  4. params = dict(urlparse.parse_qsl(sys.argv[2].replace('?', '')))
  5. mode = params.get('mode')
  6. def ScraperChoice():
  7. from lambdascrapers import providerSources
  8. sourceList = sorted(providerSources())
  9. control.idle()
  10. select = control.selectDialog([i for i in sourceList])
  11. if select == -1: return
  12. module_choice = sourceList[select]
  13. control.setSetting('module.provider', module_choice)
  14. control.openSettings('0.1')
  15. def ToggleProviderAll(enable):
  16. from lambdascrapers import providerNames
  17. sourceList = providerNames()
  18. (setting, open_id) = ('true', '0.3') if enable else ('false', '0.2')
  19. for i in sourceList:
  20. source_setting = 'provider.' + i
  21. control.setSetting(source_setting, setting)
  22. control.openSettings(open_id)
  23. def toggleAll(setting, open_id=None, sourceList=None):
  24. from lambdascrapers import getAllHosters
  25. sourceList = getAllHosters() if not sourceList else sourceList
  26. for i in sourceList:
  27. source_setting = 'provider.' + i
  28. control.setSetting(source_setting, setting)
  29. control.openSettings(open_id)
  30. if mode == "LambdaSettings":
  31. control.openSettings('0.0', 'script.module.lambdascrapers')
  32. if mode == "ScraperChoice":
  33. ScraperChoice()
  34. if mode == "ToggleProviderAll":
  35. ToggleProviderAll(False if params['action'] == "DisableModuleAll" else True)
  36. if mode == "toggleAll":
  37. open_id = params['open_id'] if 'open_id' in params else '0.0'
  38. sourcelist = params['sourcelist'] if 'sourcelist' in params else None
  39. toggleAll(params['setting'], open_id, sourceList=sourcelist)
  40. if mode == "toggleAllDebrid":
  41. sourcelist = ['2ddl','300mbfilms','bestmoviez','ddls','ddlvalley','directdl','gomovies','hevcfilm',
  42. 'myvideolink','phazeddl','power','releasebb','RLSB','rlsbb','rlsmovies','rlsscn',
  43. 'scenerls','sceper','seriescr','tvbmoviez','tvrelease','ultrahd','ultrahdindir','wrzcraft']
  44. toggleAll(params['setting'], params['open_id'], sourcelist)
  45. if mode == "toggleAllGerman":
  46. sourcelist = ['allucde','animebase','animeloads','bs','cine','cinenator','ddl',
  47. 'filmpalast','foxx','hdfilme','hdstreams','horrorkino','iload','kinodogs','kinoking',
  48. 'kinow','kinox','lichtspielhaus','movie2k-ac','movie2k-ag','movie2z','movie4k','moviesever',
  49. 'movietown','netzkino','proxer','pureanime','serienstream','seriesever','stream-to',
  50. 'streamdream','streamflix','streamit','tata','video4k','view4u']
  51. toggleAll(params['setting'], params['open_id'], sourcelist)
  52. if mode == "toggleAllPolish":
  53. sourcelist = ['alltube','boxfilm','cdahd','cdax','ekinomaniak','ekinotv','filiser',
  54. 'filmwebbooster','iitv','movieneo','openkatalog','paczamy','segos','szukajkatv','trt']
  55. toggleAll(params['setting'], params['open_id'], sourcelist)
  56. if mode == "toggleAllForeign":
  57. sourcelist = ['allucde','animebase','animeloads','bs','cine','cinenator','ddl',
  58. 'filmpalast','foxx','hdfilme','hdstreams','horrorkino','iload','kinodogs','kinoking',
  59. 'kinow','kinox','lichtspielhaus','movie2k-ac','movie2k-ag','movie2z','movie4k','moviesever',
  60. 'movietown','netzkino','proxer','pureanime','serienstream','seriesever','stream-to',
  61. 'streamdream','streamflix','streamit','tata','video4k','view4u',
  62. 'alltube','boxfilm','cdahd','cdax','ekinomaniak','ekinotv','filiser',
  63. 'filmwebbooster','iitv','movieneo','openkatalog','paczamy','segos','szukajkatv','trt']
  64. toggleAll(params['setting'], params['open_id'], sourcelist)
  65. if mode == "Defaults":
  66. sourcelist = ['4kmovieto','1080P','bobmovies','bnwmovies',
  67. 'cartoonhd','coolmoviezone','darewatch','divxcrawler',
  68. 'fmovies','freefmovies','freeputlockers','furk','gostream',
  69. 'gowatchseries','Hdmto','hdpopcorns','kattv','library',
  70. 'moviesplanet','myprojectfreetv','odb','openloadmovie','ororo',
  71. 'plocker','primewire','putlocker','reddit','seehd','series9','seriesfree',
  72. 'seriesonline','streamlord','tvbox','videoscraper','vidics',
  73. 'watchonline','watchseries','xmovies','xwatchseries','ymovies']
  74. toggleAll(params['setting'], params['open_id'], sourcelist)