scrape data from my personal website to a Numbers file

I would like to scrape stock info that I collect on my website to a Numbers file and populate it so I can study the data and do my own analysis on it. I have looked at some other answers on here but they don't explain how to scrape something from a website or how to enter https scraped site data into Numbers.

MacBook Air 13″, macOS 14.5

Posted on Jun 28, 2024 12:10 PM

Reply
6 replies

Jun 29, 2024 8:06 AM in response to ike_like

If you find an AppleScript that will scrape the site for LibreOffice or for a text editor or if it puts it on the clipboard to be pasted wherever you want, we can probably adapt it for Numbers. The code you included here was from SGIII 8 years ago for finance.yahoo.com. I don't know if it is applicable to your website or not.


Feeding Exchange Rate into Numbers - Apple Community


Historic stock data is available within Numbers using the STOCKH function. CURRENCYH does the same for exchange rates. STOCKH has data for dogecoin. Can you use those functions instead of scraping the website?



Jun 28, 2024 5:53 PM in response to ike_like

This is some code that was close to what I wanted to do but I couldn't figure out what any of it was doing because the website was no longer active. I have entered a new website into the part where a web address is needed but I still need help understanding how to make it scrape from the website to a Numbers file.


set quoteProperties to "USD"

set theSymbol to "Dogecoin (DOGE)"

set {s, t, c} to {"Sheet 1", "Table 1", "B2"}



tell application "Numbers" to tell front document's sheet s's table t

set cellc's value to my getYDATA(theSymbol, quoteProperties)

end tell



to getYDATA(symb, qProp)

set baseURL to

set symbStr to "s=" & symb

set propStr to "&f=" & qProp


do shell script "curl -s " & "'" & baseURL & symbStr & propStr & "'"


end getYDATA


[Edited by Moderator]

Jun 29, 2024 7:09 AM in response to ike_like

Well that is unfortunate. I would like to use a spreadsheet program to get up to the minute data and collect it to be manipulated for study and possible project development.


Is it possible to scrape to a LibreOffice spreadsheet with AppleScript? I was able to scrape to Excel before when I started the project in 2020, but I don't want to pay for a program like Excel if it is possible to use something open source and affordable. I can't make ends meet already and if I need to buy an Excel subscription I most likely won't be interested in continuing the project. It is too expensive to run the project completely alone and with no training of how to compile my own data for study of the parameters.


I am at the very beginning of fiscal studies and I want to measure stock and crypto data from my own sources and have the freedom to create my own regression fits to the aggregation of the data.


I never received any fiscal training during university and I think it is an essential part of fiscal independence these days.


I was trained how to analyze data sets and this is a popular subject that everyone balks on the warranty of so I figured I should study it myself as opposed to treating it like a blackjack table and losing my money to a scam yet again. I have people that could provide me with safe investments but I would like to roll around in the data mud myself in order to build my own version of a mutual fund that can trade with my own algorithms that I have regression hardened and studied with my skills.


I appreciate your guidance. Numbers seems to have some built in currency analysis that I could use but I would like to scrape every several minutes to a LibreOffice spreadsheets with AppleScript if it is possible to give me an easy example to grab and modify for my criteria. Thnx

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

scrape data from my personal website to a Numbers file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.