# Is it possible to automatically extract a specific values from a website?

**URL:** https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962
**Category:** Factual Questions
**Created:** [September 17, 2008, 7:45am UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962 "2008-09-17T07:45:50Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Dog80](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@Dog80](https://boards.straightdope.com/u/Dog80)
#### Post date: [September 17, 2008, 7:45am UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/1 "2008-09-17T07:45:50Z")

</div>

It is a website that posts wholesale fuel prices. It would be very helpful if I could somehow extract those values automatically.

The website is this: [http://www.gge.gr/36/index.asp](http://www.gge.gr/36/index.asp)  
The first link has the prices for today: [http://www.gge.gr/36/sub.asp?3023](http://www.gge.gr/36/sub.asp?3023). All other pages follow the same format.

Is there any way to extract those values, preferably to an Excel file?

---

<div class="post-metadata">

### Author: ![puppygod](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@puppygod](https://boards.straightdope.com/u/puppygod)
#### Post date: [September 17, 2008, 8:14am UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/2 "2008-09-17T08:14:11Z")

</div>

I never used it, but it seems that iMacros add-on to Firefox can extract values - and maybe fill them in form also. One of the demo macros is even titled ‘extract and fill’.

---

<div class="post-metadata">

### Author: ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)
#### Post date: [September 17, 2008, 10:24am UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/3 "2008-09-17T10:24:14Z")

</div>

The process you need to use is called **HTML Screen Scraping**. Google this term and you will find all sorts of tools and how-to documents. You will probably need to create some code to get exactly what you want, and you will want to understand Regular Expressions. Perl will probably be your friend.

Good luck.

Si

---

<div class="post-metadata">

### Author: ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)
#### Post date: [September 17, 2008, 1:33pm UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/4 "2008-09-17T13:33:41Z")

</div>

> [@si\_blakely](#):
>
> Perl will probably be your friend.

Perl is everybody’s friend. If you want to do some multi-page screen-scraping, then the [WWW::Mechanize](http://search.cpan.org/~petdance/WWW-Mechanize-1.34/lib/WWW/Mechanize.pm) suite can do it very easily. I’d write some sample code for you, but I don’t really know what you want to extract from that site. (It’s all Greek to me.)

---

<div class="post-metadata">

### Author: ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)
#### Post date: [September 17, 2008, 2:25pm UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/5 "2008-09-17T14:25:40Z")

</div>

> [@friedo](#):
>
> Perl is everybody’s friend.

For certain values of _friend_ 😉

Si

---

<div class="post-metadata">

### Author: ![AHunter3](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ahunter3/32/368_2.png) [@AHunter3](https://boards.straightdope.com/u/AHunter3)
#### Post date: [September 17, 2008, 2:48pm UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/6 "2008-09-17T14:48:13Z")

</div>

FileMaker.

Make a web viewer object and aim it at your web site, give the object a name in Object Info, then use Middle (), Position (), and PatternCount () to parse the raw HTML returned when you query Get(LayoutObjectAttributes) of it, specifying content.

If you want it recorded, have your script go on to create a new record, timestamp it, and set a local field to the abstracted price values.

You want it spat out as Excel, that’s easy enough too.

---

<div class="post-metadata">

### Author: ![Young\_Scrappy](https://avatars.discourse-cdn.com/v4/letter/y/f0a364/32.png) [@Young\_Scrappy](https://boards.straightdope.com/u/Young_Scrappy)
#### Post date: [September 17, 2008, 2:50pm UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/7 "2008-09-17T14:50:49Z")

</div>

Quicken automatically extracts personal account info from bank websites. I think.

---

<div class="post-metadata">

### Author: ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)
#### Post date: [September 17, 2008, 4:02pm UTC](https://boards.straightdope.com/t/is-it-possible-to-automatically-extract-a-specific-values-from-a-website/463962/8 "2008-09-17T16:02:00Z")

</div>

> [@Young\_Scrappy](#):
>
> Quicken automatically extracts personal account info from bank websites. I think.

It doesn’t do it through HTML-scraping, though. The banks provide either an API or a statement file in a popular format that Quicken can import.
