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

Add supports of Pixiv & twipple thumbnails #113

Merged
merged 1 commit into from Jan 20, 2017

Conversation

Projects
None yet
2 participants
@shuuji3
Contributor

shuuji3 commented Jan 14, 2017

  • Pixiv: Most popular Japanese fanart & illustration community like DeviantArt
  • twipple: Twitter client and image sharing service provided by BIGLOBE, a famous Japanese ISP

You can test thumbnail preview by searching "p.twpl.jp OR p.twipple.jp" or "#pixiv <your favorite works>" on TweetDeck.

Add supports of Pixiv & twipple thumnails
- [Pixiv](https://pixiv.net): Most popular Japanese fanart & illustration community like [DeviantArt](https://deviantart.com)
- [twipple](http://twipple.jp): Twitter client and image sharing service provided by BIGLOBE, a famous Japanese ISP
return {
type: 'image',
thumbnail_url: thumbnailUrl,
url: $.getSafeURL(imgUrl),

This comment has been minimized.

@eramdam

eramdam Jan 15, 2017

Owner

You already did getSafeURL once, you don't need to do it another time

@shuuji3

This comment has been minimized.

Contributor

shuuji3 commented Jan 16, 2017

To get an image, I used this script provided by Pixiv to embed images on the website. However, it seems that the large size image (600x600 and 1200x1200) is shown only through getSafeURL(). Though only 240x480 size image can be shown without getSafeURL(), it's too small to view.

@shuuji3 shuuji3 changed the title from Add supports of Pixiv & twipple thumnails to Add supports of Pixiv & twipple thumbnails Jan 16, 2017

@eramdam

This comment has been minimized.

Owner

eramdam commented Jan 16, 2017

@shuuji3 I guess, but you're still doing getSafeURL() over the result of getSafeURL(), resulting in a very long and buggy URL. I can fix that after merging the PR but it would be better if you fixed it 😄 It's just a matter of changing

url: $.getSafeURL(imgUrl)

to

url: imgUrl
@shuuji3

This comment has been minimized.

Contributor

shuuji3 commented Jan 16, 2017

Yes, I can understand what you'd like to say and we shouldn't nest getSafeURL. But without nesting getSafeURL, we failed to fetch the large image.

For example, for this Pikachu work⚡️, we can get the small image URL(240x480) and can fetch it without getSafeURL, but we cannot fetch the large one(1200x1200). However, after accessing the endpoint from a browser, we can fetch that one. When Better TweetDeck try to fetch the large one from modal(or preview?) window, it fails.

So, I assume there is something to block direct access to the large image and Google proxy can avoid it. I don't know what the proxy do, but it works well. So I think we need to nest getSafeURL to solve the problem, or should we try another approach?

@eramdam

This comment has been minimized.

Owner

eramdam commented Jan 17, 2017

Hum, ok. I will try to see if I can find another approach later. You might also want to sync your fork, I updated master with some fixes on the modal templates.

@shuuji3

This comment has been minimized.

Contributor

shuuji3 commented Jan 17, 2017

I'm sorry to bother you. Thank you! 😊

@eramdam eramdam merged commit 9771c58 into eramdam:master Jan 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment