download a comic strip and email to myself with Ruby?

  • Thread starter SpringFlowers AutumnMoon
  • Start date
A

Alex

[Note: parts of this message were removed to make it a legal post.]

I would use Hpricot to parse the HTML and get the image, then any of the
Ruby email libraries to send it to yourself. It's really a trivial problem,
but if you're having specific issues, I'm sure many of the people on this
list would be willing to help.

Alex
 
A

Andrew Timberlake

I would use Hpricot to parse the HTML and get the image, then any of the
Ruby email libraries to send it to yourself. It's really a trivial problem,
but if you're having specific issues, I'm sure many of the people on this
list would be willing to help.

Alex

Even easier, find out how the images are named because they are often
named yyyymmdd.jpg or similar and then just try and pull the image for
the day in question.
404 - no image
200 - you've got it

Andrew Timberlake
http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings
 
J

Jian Lin

Alex said:
I would use Hpricot to parse the HTML and get the image, then any of the
Ruby email libraries to send it to yourself. It's really a trivial
problem,
but if you're having specific issues, I'm sure many of the people on
this
list would be willing to help.

is it true that we just use the smtp.my-isp.com to send it? is there
any other way?
 
A

Alex

[Note: parts of this message were removed to make it a legal post.]

You can use any SMTP server to email the images. I would just use Net::SMTP
with whatever SMTP server you happen to be using. It's true that some ISPs
offer SMTP servers, but smtp.<your_isp>.com may not be the naming convention
that your ISP uses.

Remember, you're going to need to attach the image to the email as well, so
you'll need to create a multipart message, with the image data encoded in
base64. I'm sure there's a library that can handle that for you, although
I'm not very familiar with using ruby to manipulate email messages.



Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top