Accurate gold coin offer price scraping for the spreadsheet nerds

Discussion of the Gold portion of the Permanent Portfolio

Moderator: Global Moderator

Post Reply
User avatar
dualstow
Executive Member
Executive Member
Posts: 14232
Joined: Wed Oct 27, 2010 10:18 am
Location: synagogue of Satan
Contact:

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by dualstow » Wed Nov 29, 2017 11:01 am

Damn, the colorado gold link isn't working for me anymore.

Code: Select all

=importhtml("http://www.coloradogold.com/htsell.php","table",1)
Going to try apmex again.

Nah, that's not working either. I should just type in the value manually once in a while.
Sam Bankman-Fried sentenced to 25 years
User avatar
Kriegsspiel
Executive Member
Executive Member
Posts: 4052
Joined: Sun Sep 16, 2012 5:28 pm

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by Kriegsspiel » Wed Nov 29, 2017 11:23 am

dualstow wrote: Nah, that's not working either. I should just type in the value manually once in a while.
I just go to kitco and type in the gold spot price. No big deal.
User avatar
dualstow
Executive Member
Executive Member
Posts: 14232
Joined: Wed Oct 27, 2010 10:18 am
Location: synagogue of Satan
Contact:

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by dualstow » Wed Nov 29, 2017 11:25 am

Yeah, Kitco is where I usually peek outside of spreadsheets.
I just type 'k' into the chrome browser and chrome rolls its eyes and takes me there.
Sam Bankman-Fried sentenced to 25 years
flyingpylon
Executive Member
Executive Member
Posts: 1102
Joined: Fri Jan 06, 2012 9:04 am

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by flyingpylon » Wed Nov 29, 2017 1:54 pm

Here's one that still works:

=Index(ImportHTML("https://www.moneymetals.com/precious-me ... ,"table",1),2,2)

It's getting more difficult to find sites still using tables, that deliver the same page content to both browsers and Google Sheets, and don't use javascript to populate the price value, etc.
User avatar
dualstow
Executive Member
Executive Member
Posts: 14232
Joined: Wed Oct 27, 2010 10:18 am
Location: synagogue of Satan
Contact:

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by dualstow » Wed Nov 29, 2017 3:17 pm

It does indeed work, thanks! I keep all these different lines of code in the comment section of the gold price sell of my spreadsheet. That way I can try alternates when one fails.
Sam Bankman-Fried sentenced to 25 years
User avatar
Cortopassi
Executive Member
Executive Member
Posts: 3338
Joined: Mon Feb 24, 2014 2:28 pm
Location: https://www.jwst.nasa.gov/content/webbL ... sWebb.html

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by Cortopassi » Wed Dec 06, 2017 1:44 pm

flyingpylon wrote:Here's one that still works:

=Index(ImportHTML("https://www.moneymetals.com/precious-me ... ,"table",1),2,2)

It's getting more difficult to find sites still using tables, that deliver the same page content to both browsers and Google Sheets, and don't use javascript to populate the price value, etc.
Thanks. Apmex just seemed to go away again and this does work.

Otherwise, the other options I've considered:

1) Hey, not supposed to be looking at the PP every minute anyway. Just enter the price manually for gold.
2) Use GLD and a multiplier. I do this already as a backup. Gets you pretty close.
User avatar
dualstow
Executive Member
Executive Member
Posts: 14232
Joined: Wed Oct 27, 2010 10:18 am
Location: synagogue of Satan
Contact:

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by dualstow » Thu Feb 04, 2021 10:03 am

None of the codes on these two pages are working for me today. Maybe it's a Google Sheets problem.
Sam Bankman-Fried sentenced to 25 years
User avatar
Mark Leavy
Executive Member
Executive Member
Posts: 1950
Joined: Thu Mar 01, 2012 10:20 pm
Location: US Citizen, Permanent Traveler

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by Mark Leavy » Thu Feb 04, 2021 11:07 am

These two are both working for me right now.

Code: Select all

=importhtml("http://www.coloradogold.com/htsell.php","table",1)

Code: Select all

=importhtml("http://www.ajpm.com/gold-bullion.html","table",0)
User avatar
dualstow
Executive Member
Executive Member
Posts: 14232
Joined: Wed Oct 27, 2010 10:18 am
Location: synagogue of Satan
Contact:

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by dualstow » Thu Feb 04, 2021 2:32 pm

Mark Leavy wrote:
Thu Feb 04, 2021 11:07 am
These two are both working for me right now.
...
Darn, they're not working for me. Thanks, anyway.
Sam Bankman-Fried sentenced to 25 years
User avatar
pors
Associate Member
Associate Member
Posts: 27
Joined: Sun Jan 03, 2021 2:06 am

Re: Accurate gold coin offer price scraping for the spreadsheet nerds

Post by pors » Fri Feb 05, 2021 2:51 am

Mark Leavy wrote:
Thu Feb 04, 2021 11:07 am
These two are both working for me right now.

Code: Select all

=importhtml("http://www.coloradogold.com/htsell.php","table",1)

Code: Select all

=importhtml("http://www.ajpm.com/gold-bullion.html","table",0)

Awesome thanks! The result takes up quite a few cells, but at least it works :)
Post Reply