Skip to content

Commit

Permalink
patch meiju
Browse files Browse the repository at this point in the history
  • Loading branch information
yfang1644 committed Nov 7, 2020
1 parent e01bfe1 commit 847c66b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@

<addon id="plugin.video.meiju"
name="美剧"
version="1.0.2"
version="1.0.3"
provider-name="yfang1644">
<requires>
<import addon="script.module.xbmcswift2" version="2.4.0"/>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d479edd00b5503961060fc0fa73e08e6 addons.xml
62addde576e632eea2b6b16a9909bddb addons.xml
2 changes: 1 addition & 1 deletion plugin.video.meiju/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.meiju"
name="美剧"
version="1.0.2"
version="1.0.3"
provider-name="yfang1644">
<requires>
<import addon="script.module.xbmcswift2" version="2.4.0"/>
Expand Down
13 changes: 8 additions & 5 deletions plugin.video.meiju/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from json import loads
import time

YYETSS = 'http://www.yyetss.com/'
YYETSS = 'http://www.yyetss.com'
TTKMJ = 'https://www.ttkmj.org/'
MEIJUXIA = 'http://www.meijuxia.vip'
BANNER = '[COLOR FFDEB887]{}[/COLOR]'
Expand Down Expand Up @@ -207,6 +207,7 @@ def yyplay(url):
@plugin.route('/yyepisodes/<url>/')
def yyepisodes(url):
plugin.set_content('TVShows')
if url[0] == '/': url = YYETSS + url
html = get_html(url)
soup = BeautifulSoup(html, 'html.parser')
tree = soup.findAll('div', {'class':'tab_set_info'})
Expand Down Expand Up @@ -273,10 +274,11 @@ def yyfilter(url):

tree = soup.findAll('ul', {'class':'list-inline'})
titles = tree[0].findAll('li')
lst = [x.text for x in titles[1:]]
names = titles[1].findAll('a')
lst = [x.text for x in names[:]]
sel = dialog.select('年份', lst)
sel = max(0, sel)
href = titles[1+sel].a['href']
href = names[sel]['href']
hs = href.split('-')
year = hs[2]
return yycategory(cate, year, 1)
Expand All @@ -287,7 +289,7 @@ def yycategory(cate, year, page):
plugin.set_content('TVShows')
items = []

url = YYETSS + 'list-{}-{}-{}.html'.format(cate, year, page)
url = YYETSS + '/list-{}-{}-{}.html'.format(cate, year, page)
html = get_html(url)
soup = BeautifulSoup(html, 'html.parser')

Expand Down Expand Up @@ -326,7 +328,8 @@ def yycategory(cate, year, page):
# 分页
items.append({
'label': BANNER.format('分页'),
'path': url_for('stay')
'path': url_for('stay'),
'is_playable': True
})
pages = tree[0].findAll('li')
for item in pages:
Expand Down
Binary file not shown.

0 comments on commit 847c66b

Please sign in to comment.