# How to Get data from Web Page to Database

**URL:** <https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200>\
**Category:** Rails\
**Created:** [February 20, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200 "2007-02-20T15:51:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 20, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/1 "2007-02-20T15:51:56Z")

</div>

Hi,

I want to get the details from a table which is displayed on a Web  
page into the Database.

How to read that Web page ? I mean if there is table Student details  
like Roll no., name etc.

And I want to read that table & store it into my database in table  
My\_Student. How to do this?

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 20, 2007, 4:52pm UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/2 "2007-02-20T16:52:19Z")

</div>

If you want to do this with rails it would be easier to design your  
tables using ActiveRecord.

[http://api.rubyonrails.com/](http://api.rubyonrails.com/)

This might also give you an idea of how to start

> **[Radar - O’Reilly](https://www.oreilly.com/radar/)**
>
> Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

On Feb 20, 7:51 am, “manohar amrutkar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 20, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/3 "2007-02-20T17:46:02Z")

</div>

manohar amrutkar wrote:

> Hi,
> 
> I want to get the details from a table which is displayed on a Web  
> page into the Database.
> 
> How to read that Web page ? I mean if there is table Student details  
> like Roll no., name etc.
> 
> And I want to read that table & store it into my database in table  
> My\_Student. How to do this?

Use the CRUD scaffolding feature of Ruby on Rails to store, update.  
delete database records.

> **[Ruby on Rails](https://www.theregister.com/2006/07/03/ruby_rails_part1/)**
>
> Simpler than J2EE

> **[Ruby on Rails Part 2](https://www.theregister.com/2006/07/17/ruby_rails_part2/)**
>
> Here goes

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 20, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/4 "2007-02-20T19:49:38Z")

</div>

This one might be helpful as well

[http://rails.raaum.org/activerecord.html](http://rails.raaum.org/activerecord.html)

On Feb 20, 8:37 am, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 20, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/5 "2007-02-20T19:52:38Z")

</div>

On Feb 20, 9:51 am, “manohar amrutkar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi,
> 
> I want to get the details from a table which is displayed on a Web  
> page into the Database.
> 
> How to read that Web page ? I mean if there is table Student details  
> like Roll no., name etc.
> 
> And I want to read that table & store it into my database in table  
> My\_Student. How to do this?

Manohar - if I understand your question, you want to webscrape and put  
the data in db?

if so this article explores different means to that end:  
[http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails](http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails)

Jodi

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 21, 2007, 11:12am UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/6 "2007-02-21T11:12:17Z")

</div>

On Feb 20, 2:51 pm, “manohar amrutkar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi,
> 
> I want to get the details from a table which is displayed on a Web  
> page into the Database.
> 
> How to read that Web page ? I mean if there is table Student details  
> like Roll no., name etc.

This might be of assistance:

[http://www.igvita.com/blog/2007/02/04/ruby-screen-scraper-in-60-seconds/](http://www.igvita.com/blog/2007/02/04/ruby-screen-scraper-in-60-seconds/)

Glenn

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 21, 2007, 11:35am UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/7 "2007-02-21T11:35:19Z")

</div>

Jodi wrote:

> > like Roll no., name etc.  
> > You could also check out scRUBYt!, a web scraping framework based on  
> > Hpricot and WWW::Mechanize:

[http://scrubyt.org](http://scrubyt.org)

Cheers,  
Peter

\_\_  
[http://www.rubyrailways.com](http://www.rubyrailways.com) :: Ruby and Web2.0 blog  
[http://scrubyt.org](http://scrubyt.org) :: Ruby web scraping framework  
[http://rubykitchensink.ca/](http://rubykitchensink.ca/) :: The indexed archive of all things Ruby.

---

<div class="post-metadata">

**Author:** ![manohar\_amrutkar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Post date:** [February 22, 2007, 12:17am UTC](https://www.ruby-forum.com/t/how-to-get-data-from-web-page-to-database/86200/8 "2007-02-22T00:17:36Z")

</div>

It can be easily done with SWExplorerAutomation from

> **[Webiussoft](https://webiussoft.com/)**
>
> Breaking News and Insights from the Dynamic Tech World

SWEA Visual Data Extractors allow to define the table structure and  
return data in DataTable object. The SWEA API can be used from .Net  
or from Ruby using RubyCLR.

On Feb 20, 9:51 am, “manohar amrutkar” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
