Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented hummingbird.me and reworked code slightly to allow more flexibility for providers #1

Merged
merged 2 commits into from Oct 14, 2014

Conversation

fuzetsu
Copy link

@fuzetsu fuzetsu commented Oct 12, 2014

Some sites, like hummingbird.me, rely heavily on javascript to deliver the anime list content making it impossible to get the content with a simple http request. Fortunately hummingbird.me has a JSON API which I made use of instead.

The major changes I made are:

  • added beforSend function to anime-list-provider, called before sending anime list request
  • added overrideParse function to allow custom/non-regex parsing of anime lists
  • added apiUrl and apiUrlSuffix used only to retrieve anime list and not displayed to user in popup
  • included responseType for anime list request (defaulting to text) for a consistency with beforeSend

Note: In the hummingbird provider I send a header with an API key I generated on mashape.

I recognize that this isn't a beautiful fix but I made it for myself and I figured I might as well share in case it can be of use to the main project. Perhaps a more complete reworking of the provider processing code is in order to better handle cases like these.

customized code a bit to allow for custom parsing from provider (regex
doesn't work for hummingbird because the page depends on javascript to
load so API must be used)
@akyoto
Copy link
Member

akyoto commented Oct 12, 2014

Hi, thank you for the pull request!
I am currently busy but I will check it as soon as possible.

akyoto added a commit that referenced this pull request Oct 14, 2014
Implemented hummingbird.me and reworked code slightly to allow more flexibility for providers
@akyoto akyoto merged commit 5319f32 into animenotifier:master Oct 14, 2014
@akyoto
Copy link
Member

akyoto commented Oct 14, 2014

I tested it and it works, thank you very much for your help!

akyoto pushed a commit that referenced this pull request Jun 22, 2017
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.

None yet

2 participants