Our Preferred 5 Star Hosting Provider - Award Winning FileMaker Pro Hosting
Results 1 to 2 of 2
  1. #1
    Free Ride Member
    Join Date
    Feb 2015
    new york usa
    Skill Level
    Last Post
    Local Date
    Local Time
    09:12 PM
    Last Active

    FM and web scraping

    I am trying to work on a personal database that would scrape a certain website and put that information into a database

    I have been working on the excel / access route but on looking at the features of FM8.5 it seems that you can do the job totally in the FM program

    Can anybody give me any info on setting up an automated process with FM to scrape certain parts of a page on a website based on a common link and viewing the results in a table. Is this a pretty standard feature of any database program or is FM particularly suited to this?

    As you can probably tell this is by no means my area of expertise but I have the free trial and I am ready to go
    Warning: This is an Old Thread
    This discussion is older than 420 days. information contained in it may no longer be current
    Pick up virtue from everyone

  2. #2
    Senior Moderator - FMT Preferred Developer Consultant - New York - Worldwide AHunter3's Avatar
    Join Date
    Aug 2006
    New York and Nassau County, NY, USA
    FileMaker Pro Software
    FileMaker Advanced/Developer 14, 13, 12, 11, 10, 9. 8.8, 8, 7, 6, 5.5 FileMaker Pro 8, 7, 6, 5.5, 5
    Windows & Mac
    Skill Level
    Last Post
    Local Date
    Local Time
    09:12 PM
    Last Active
    a) Create a webviewer on a layout and give it a name. In the example below I am naming my web viewer "WebScraper". Don't omit the naming step. It will not work if you do not name your web viewer!

    b) Either natively (as part of the webviewer definition) or via scrip step "Set Web Viewer", load the page you intend to scrape in the web viewer. Give it time enough to load (i.e., Pause for a relevant # of seconds)

    c) Set a $Variable to GetLayoutObjectAttribute ( "WebScraper" ; "content" ) where "WebScraper" is the name you gave to your web viewer

    d) Examine raw code from the web site itself. Most web browsers will show you the source code. Using text parsing commands such as Middle and Position and Length and PatternCount and so forth, isolate the relevant chunk or chunks of text from the $Variable and make use of them as you see fit — make new records or populate fields in existing records, etc

    Here is an example using http://themoneyconverter.com/GBP/EUR.aspx to snag the current conversion rate between British pound sterling and euro:

    Go to Layout ["Layout with Web Viewer"]
    Pause [ 1 second]
    Set Variablel [$Code; GetLayoutObjectAttribute ( "WebScraper" ; "content" ) ]
    Set Variable [$Snippet; Middle ($Code; Position ($Code; "Latest Exchange Rates: 1 British Pound Sterling ="; 1; 1); Length ($Code) )]
    Set Variable [$Snippet2; Middle ($Snippet; Position ($Snippet; "= "; 1; 1)+2; Length ($Snippet) ) ]
    Set Variable [$Pound to Euro; Middle ($Snippet2; 1; Position ($Snippet2; " Euro"; 1; 1)-1) ]
    Last edited by AHunter3; 03-09-2015 at 09:38 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Scraping Links to WebDirect database
    By McDeth in forum FileMaker WebDirect
    Replies: 0
    Last Post: 12-05-2013, 01:24 PM
  2. Web Scraping Basics
    By mkohler28 in forum The Ray Cologon Files
    Replies: 2
    Last Post: 01-22-2007, 11:00 AM
  3. FM and web scraping
    By geeboy30 in forum Microsoft Office & FileMaker
    Replies: 0
    Last Post: 09-11-2006, 09:19 AM
  4. Scraping data from Web pages into FileMaker
    By Morgan Jones in forum Exporting and Importing
    Replies: 0
    Last Post: 06-21-2005, 04:14 PM
  5. Scraping HTML code from web pages and loading it to FM
    By KurtK in forum FM IWP - Web Companion and Web Publishing
    Replies: 3
    Last Post: 03-31-2002, 01:09 AM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Welcome to the Original FileMaker Forum
With designated forums for almost every FileMaker topic...FileMaker Today is a FREE to join community where you can boost your FileMaker expertise, build better apps & solutions and interact with over 43,000+ FileMaker Developers from all over the world. If you're building FileMaker solutions, this is the place for you.
Follow FMT
We Are FMT
FMT is home of The World's leading FileMaker News Site, Worldwide Developer Directory, FileMaker Connect Community and so much more.