1)我正在構建一個應用程序,用於從我的instagram個人資料中下載我的所有照片。繞過javascript來獲取頁面源
2)我不想使用Instagram的API,因此我搜索,我發現硒的webdriver和我這個包添加到我的項目
3)我使用C#來構建Android應用(Xamarin)檢查以下碼。
string url = "https://www.instagram.com/" + _theUsername;
IWebDriver driver = new FirefoxDriver();
driver.Url = url;
string source = driver.PageSource;
4)通過上面的代碼我得到以下錯誤: -
OpenQA.Selenium.DriverServiceNotFoundException: The geckodriver file does not exist in the current directory or in a directory on the PATH environment variable
5)是否有可能在xamarin使用呢?我需要找到一個方法來做到這一點 任何幫助將不勝感激
也許最好的方式來做到這一點,使用webview來提取頁面源 –
我確實設法加載頁面內的web視圖與JavaScript上,一切正常,但正如我所說,我需要的頁面源,我不想顯示頁面 –