-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run Canopy in .fsi? #509
Comments
Since you are using f# you dont have to fully qualify all of your functions. The code snippet on this page will get you part way there: http://lefthandedgoat.github.io/canopy/
that should get you there, if you have any specific errors let me know |
Also here is another thread that may help you. #457 |
The zip file here will help: #385 It's really really old, but the structure should be about the same |
Something like
from: https://lefthandedgoat.github.io/canopy//Docs/actions.html canopy lets you use xpath/css/jquery selectors by default. You can use You may be better off using an http api to get your stock data, scraping webpages is painful. I was looking into this one recently: https://www.alphavantage.co/ |
this might help you with http stuff: https://github.com/amirrajan/exploring-fsharp/blob/master/002/002.fsx |
Chris:
I am trying to use Canopy to scrape some web pages - pass in a uri and getting the html document from a page (after the javascript runs)
I opened .fsi and wrote this code:
#r "nuget: Canopy"
#r "nuget: Selenium.WebDriver.ChromeDriver"
open canopy.classic
open canopy.configuration
open canopy.runner.classic
//canopy.configuration.chromeDir <- System.AppContext.BaseDirectory
canopy.configuration.chromeDir <- executingDir
canopy.configuration.elementTimeout <- 3.0
canopy.configuration.pageTimeout <- 3.0
let reporter = canopy.reporters.LiveHtmlReporter(Chrome, canopy.configuration.chromeDir) :> canopy.reporters.IReporter
canopy.classic.start(canopy.types.BrowserStartMode.Chrome, reporter)
let url = "https://finance.yahoo.com/quote/MSFT/press-releases"
canopy.classic.url(url)
except IReporter is defined in the ConsoleReporter type?
Am I even on the right track to do this?
The text was updated successfully, but these errors were encountered: