Excuse all the questions lately but in my defense, I am making money.
Grabbing BF URL for market in a cell?
Gary -yes, sure it's possible. In cell A1 (hidden) you have the marketid of the event. depending on the market, you'd use the betfair url and concatenate as required. e.g. if it were for horseracing, the url scheme is: https://www.betfair.com/exchange/plus/h ... .167343058.
Therefore, you'd concatenate A1 along the lines of:
Hope this helps.
Therefore, you'd concatenate A1 along the lines of:
Code: Select all
marketUrl = "1.167343058" ' cached from cell A1
marketUrlLink = "https://www.betfair.com/exchange/plus/horse-racing/market/" & marketUrl
' then - insert marketUrlLink into the required cell, either as a link or hard text, depending on your requirement
AddHyperlinkToCell ActiveSheet, "N24", marketUrlLink
Code: Select all
Sub AddHyperlinkToCell(targetSheet as WorkSheet, cellTarget as String, marketUrlLink as String)
targetSheet.Hyperlinks.Add Range(cellTarget), Address:= marketUrlLink
End Sub-
spreadbetting
- Posts: 3140
- Joined: Sun Jan 31, 2010 8:06 pm
If the URL is in A1 you have so many options to get data from the betfair site using the various URL's that are used to grab the inital data from Betfair been a while since screen scraping as I use the API now but used to use the following to grab certain types of data. There are many types of data like RUNNER_METADATA you can request, or omit, and it all comes back as json.
https://www.betfair.com/www/sports/exch ... R_METADATA
https://www.betfair.com/www/sports/exch ... R_METADATA
Do you have an example, please mate?spreadbetting wrote: ↑Mon Jan 13, 2020 5:09 pmIf the URL is in A1 you have so many options to get data from the betfair site using the various URL's that are used to grab the inital data from Betfair been a while since screen scraping as I use the API now but used to use the following to grab certain types of data. There are many types of data like RUNNER_METADATA you can request, or omit, and it all comes back as json.
https://www.betfair.com/www/sports/exch ... R_METADATA
