I am having a hard time to find how to save the page as html or .txt using command line in Chrome Browser,
This is what I've done so far,
C:\Users\Cipher\AppData\Local\Google\Chrome\Application>chrome.exe --new-window
http://google.com
This command will open a new window of Chrome browser and visit google.com but i couldn't be able to figure our how can i save google.com as html or as txt file , is there anyway to do so using command prompt ?
Check Your Internet Connection The reason why Chrome is not loading pages may be down to something as simple as unstable or lost internet connection. Ensure that you have an active data plan, and restart your internet connection. Also, try loading other browsers and apps such as Firefox and WhatsApp.
Method 2 of 2: The easiest way to open a URL is to click or tap a link in an app or website. Scroll to the URL. Text URLs usually appear in a different color than the rest of the text. They may also display a picture from the website and/or a headline that describes the site.
You cannot perform the task you describe manually, but you can perform it using WebDriver automation.
Chrome can be remote controlled using an API called WebDriver (part of Selenium 2 automating suite). WebDrive has bindings for various programming languages, including e.g. JavaScript and Python.
Here is example code for Python (not tested):
from selenium import webdriver
driver = webdriver.Chrome('/path/to/chromedriver') # Optional argument, if not specified will search path.
driver.get('http://www.google.com/');
html = driver.page_source
f = open("myhtml", "wt")
f.write(html)
f.close()
Orignal example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With