Skip to content

Fix TypeError joining grouped Greek Movies episode links - #60

Open
limniotis wants to merge 1 commit into
Twilight0:masterfrom
limniotis:fix/greekmovies-grouped-links
Open

Fix TypeError joining grouped Greek Movies episode links#60
limniotis wants to merge 1 commit into
Twilight0:masterfrom
limniotis:fix/greekmovies-grouped-links

Conversation

@limniotis

Copy link
Copy Markdown

In gm_source_maker(), the branch handling paragraph-labelled episode groups (<p style="margin-top:0px; margin-bottom:4px;"> in the AJAX response) assigns the full list returned by .split('<') to host:

host = iwrapper(episode, 'p').__next__().text.split('<')

The subsequent ''.join([host, kodi.i18n(30225), p.text]) then raises:

TypeError: sequence item 0: expected str instance, list found

so grouped/parted Greek Movies episodes fail to produce any sources. This PR takes the first element (the host label text) instead:

host = iwrapper(episode, 'p').__next__().text.split('<')[0]

Verified with python -m compileall and against greek-movies.com responses; flat (non-grouped) episode lists are unaffected since they don't enter this branch.

🤖 Generated with Claude Code

In gm_source_maker(), the paragraph-labelled branch assigned the full
list returned by str.split() to host, so the subsequent str.join()
raised "TypeError: sequence item 0: expected str instance, list found".
Take the first element (the host label text) instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant