Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6200401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:21:39+00:00 2026-05-24T04:21:39+00:00

Im scraping a website using Celerity gem and I want to save an image

  • 0

Im scraping a website using Celerity gem and I want to save an image but I dont know how to do it XD

With the next Celerity command I get an IO object

irb(main):260:0* image = @browser.image(:xpath, ".//*[@class='notdTop']/img").download
=> #<IO:0x277e07ae>

How can I save this object to a jpg file?? I tried this, but didnt work:

irb(main):261:0> image.flush
IOError: not opened for writing

but the IO object is not closed because I got this:

irb(main):264:0> image.closed?
=> false

Anyone can help me please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:21:39+00:00Added an answer on May 24, 2026 at 4:21 am

    Try:

    image.save(filename)
    

    http://rubydoc.info/gems/celerity/0.8.9/Celerity/Image#save-instance_method

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been doing some HTML scraping in PHP using regular expressions. This works, but
I'm using this example to fetch links from a website : http://www.merchantos.com/makebeta/php/scraping-links-with-php/ $xpath =
I am working on upgrades to a screen scraping application. We are using an
I'm doing a personal, just for fun, project that is using screen scraping to
I'm using PHP to data scrape another website. However, on certain occasions I need
I am scraping a website with HTML with php that retrieves a page and
I am trying to do some screen-scraping of a website. The content that I
I am scraping some information from a 10 year old website that was built
I want to do some web scraping with GAE. (Infinite Campus Student Information Portal,
To save time Googling my website in order to see where my pages have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.