Browse Source

Merge pull request #25 from host505/master

Remove duplicate scraper
pull/27/head
I-A-C 1 year ago
parent
commit
66a3e001df
No account linked to committer's email address
3 changed files with 3 additions and 83 deletions
  1. 1
    1
      lib/default.py
  2. 0
    80
      lib/lambdascrapers/sources_ lambdascrapers/en/popcorn.py
  3. 2
    2
      resources/settings.xml

+ 1
- 1
lib/default.py View File

@@ -84,7 +84,7 @@ if mode == "Defaults":
'filmxy','flenix','flixanity','fmovies','freefmovies','freeputlockers','furk','genvideos','gogoanime',
'gowatchseries','hackimdb','hdpopcorns','icefilms','icouchtuner','iwatchflixxyz','kattv','l23movies','library',
'm4ufree','megahd','movie4uch','moviesplanet','myputlock','mywatchseries','odb','openloadmovie','ororo',
'plocker','popcorn','primewire','projectfree','pron','putlocker','rajahoki88','reddit','seehd','series9','seriesfree',
'plocker','primewire','projectfree','pron','putlocker','rajahoki88','reddit','seehd','series9','seriesfree',
'seriesonline','sezonlukdizi','showbox','solarmoviez','streamlord','tvbox','videoscraper','vidics',
'vodly','watch32','watchonline','watchseries','xmovies','xwatchseries','ymovies']
toggleAll(params['setting'], params['open_id'], sourcelist)

+ 0
- 80
lib/lambdascrapers/sources_ lambdascrapers/en/popcorn.py View File

@@ -1,80 +0,0 @@
# -*- coding: UTF-8 -*-
#######################################################################
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @tantrumdev wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return. - Muad'Dib
# ----------------------------------------------------------------------------
#######################################################################
# -Cleaned and Checked on 10-10-2018 by JewBMX in Yoda.

import re,requests,traceback,base64,urllib,urlparse

from resources.lib.modules import cleantitle
from resources.lib.modules import client
from resources.lib.modules import log_utils
# hdpopcorns.com goes to hdpopcorns.co always

class source:
def __init__(self):
self.priority = 1
self.language = ['en']
self.domains = ['hdpopcorns.com','hdpopcorns.co']
self.base_link = 'http://hdpopcorns.co'
self.search_link = '/search/%s'
# also can use self.search_link = '/?s=%s' both work for hdpopcorns.co
# tested the alt search link on a browser and in this scraper, both work fine.

def movie(self, imdb, title, localtitle, aliases, year):
try:
search_id = title.replace(':', ' ').replace(' ', '+').lower()
start_url = urlparse.urljoin(self.base_link, self.search_link % (search_id))

search_results = client.request(start_url)
match = re.compile('<header>.+?href="(.+?)" title="(.+?)"',re.DOTALL).findall(search_results)
for item_url,item_title in match:
movie_name, movie_year = re.findall("(.*?)(\d+)", item_title)[0]
if not cleantitle.get(title) == cleantitle.get(movie_name):
continue
if not year in movie_year:
continue
return item_url
except:
failure = traceback.format_exc()
log_utils.log('Popcorn - Exception: \n' + str(failure))
return

def sources(self, url, hostDict, hostprDict):
sources = []
if url == None: return
try:
OPEN = client.request(url)
headers = {'Origin':'http://hdpopcorns.co', 'Referer':url,
'X-Requested-With':'XMLHttpRequest', 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'}
try:
params = re.compile('FileName1080p.+?value="(.+?)".+?FileSize1080p.+?value="(.+?)".+?value="(.+?)"',re.DOTALL).findall(OPEN)
for param1, param2,param3 in params:
request_url = '%s/select-movie-quality.php' %(self.base_link)
form_data = {'FileName1080p':param1,'FileSize1080p':param2,'FSID1080p':param3}
link = requests.post(request_url, data=form_data, headers=headers,timeout=3).content
final_url = re.compile('<strong>1080p</strong>.+?href="(.+?)"',re.DOTALL).findall(link)[0]
sources.append({'source': 'DirectLink', 'quality': '1080p', 'language': 'en', 'url': final_url, 'direct': True, 'debridonly': False})
except:pass
try:
params = re.compile('FileName720p.+?value="(.+?)".+?FileSize720p".+?value="(.+?)".+?value="(.+?)"',re.DOTALL).findall(OPEN)
for param1, param2,param3 in params:
request_url = '%s/select-movie-quality.php' %(self.base_link)
form_data = {'FileName720p':param1,'FileSize720p':param2,'FSID720p':param3}
link = requests.post(request_url, data=form_data, headers=headers,timeout=3).content
final_url = re.compile('<strong>720p</strong>.+?href="(.+?)"',re.DOTALL).findall(link)[0]
sources.append({'source': 'DirectLink', 'quality': '720p', 'language': 'en', 'url': final_url, 'direct': True, 'debridonly': False})
except:pass
return sources
except:
failure = traceback.format_exc()
log_utils.log('Popcorn - Exception: \n' + str(failure))
return sources

def resolve(self, url):
return url

+ 2
- 2
resources/settings.xml View File

@@ -146,7 +146,7 @@
<setting id="provider.ymovies" type="bool" label="YMOVIES" default="false" />
</category>
<category label="Foreign">\
<category label="Foreign">
<setting label="Disable All Foreign Providers" type="action" option="close" action="RunPlugin(plugin://script.module.lambdascrapers/?mode=toggleAllForeign&amp;setting=false&amp;open_id='1.1')"/>
<setting label="Enable All Foreign Providers" type="action" option="close" action="RunPlugin(plugin://script.module.lambdascrapers/?mode=toggleAllForeign&amp;setting=true&amp;open_id='1.2')"/>
<setting label="German" type="lsep" />
@@ -203,7 +203,7 @@
<setting id="provider.trt" type="bool" label="TRT" default="false" />
</category>
<category label="Debrid Only">\
<category label="Debrid Only">
<setting label="Disable All Debrid Providers" type="action" option="close" action="RunPlugin(plugin://script.module.lambdascrapers/?mode=toggleAllDebrid&amp;setting=false&amp;open_id='1.1')"/>
<setting label="Enable All Debrid Providers" type="action" option="close" action="RunPlugin(plugin://script.module.lambdascrapers/?mode=toggleAllDebrid&amp;setting=true&amp;open_id='1.2')"/>
<setting type="sep" />

Loading…
Cancel
Save