Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Get the gem to work with the new memegenerator.net #35

Closed
matiaskorhonen opened this Issue · 4 comments

3 participants

Matias Korhonen Michał Połtyn Ali Ukani
Matias Korhonen

I just gave this a try and got as far as successfully getting a response from memegenerator.net, but alas the result page seems to be completely useless unless you have JS enabled.

You can see the progress I made on this in the following commit: k33l0r@baad685

Currently the generator works only for the Y U NO meme, as that's the only templateID that I updated.

The results page is a page like this, but as far as I can tell there's no way of extracting the image without using JS. Even with JS enabled it embeds the image with a data URI so you can't directly link to it.

Michał Połtyn

even with this patch I am getting this error:

ruby-1.9.2-p290 :001 > require 'meme'
 => true 
ruby-1.9.2-p290 :002 > m = Meme.new'Y-U-NO'
 => #<Meme:0x007f9433856c08 @template_id=166088, @template_type="AdviceDogSpinoff", @generator_name="Y-U-NO", @default_line="Y U NO"> 
ruby-1.9.2-p290 :003 > m.generate 'RUBY' 'Y U NO INCLUDE ALL METHODS IN BASE?'
ArgumentError: bad argument(expected URI object or URI string)
    from /Users/holek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/generic.rb:746:in `rescue in merge'
    from /Users/holek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/generic.rb:743:in `merge'
    from /Users/holek/.rvm/gems/ruby-1.9.2-p290/gems/meme_generator-1.10/lib/meme.rb:220:in `block in generate'
    from /Users/holek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:627:in `start'
    from /Users/holek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:490:in `start'
    from /Users/holek/.rvm/gems/ruby-1.9.2-p290/gems/meme_generator-1.10/lib/meme.rb:212:in `generate'
    from (irb):3
    from /Users/holek/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'

Guess they've changed more stuff lately

Matias Korhonen

Yeah, I happened to look at the site today and everything seems to have changed again. I think this patch is now pretty much useless.

On the upside, it looks like they have real URIs to the generated images again, so it should be possible to patch the gem to work again.

Michał Połtyn

Try memecaptain gem, works great (doesn't use memegenerator though) :D

Ali Ukani

Memegen seems to work very well. It can grab an image by its url, or load an image local to the gem from a predefined list (memegen a_dog "lol" "wut?"). The Imagemagick gem handles the text overlay.

Image result

However, I really like the way this gem handles arguments, and the code on this one is more readable. Here lies the conundrum: add local images and text overlay to this gem, or try and reorganize the code on Memegen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.