automate-save-page-as | Automate browser 's `` Save Page As '' operation | Grid library
kandi X-RAY | automate-save-page-as Summary
kandi X-RAY | automate-save-page-as Summary
This small bash script simulates a sequence of key presses which opens a given url in the browser, save the page (Ctrl+S), and close the browser tab/window (Ctrl+F4). Chained together, these operations allow you to use the "Save Page As" (Ctrl+S) programtically (currently you can use either of google-chrome, chromium-browser or firefox, and it’s fairly straight forward to add support for your favorite browser). The script needs xdotool installed (sudo apt-get install xdotool (for Ubuntu). Sidenote: My particular use case while writing this script was crawling a bunch of web pages which were rendered almost entierly on client side using lots of javascript magic (thus saving output of wget url was useless). Since the browser is capable of rendering those pages, and also saving the post-render version on disk (using Ctrl+S), I wrote this script to automate the process (Tested on Ubuntu 12.04 and 14.04 myself).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of automate-save-page-as
automate-save-page-as Key Features
automate-save-page-as Examples and Code Snippets
Community Discussions
Trending Discussions on automate-save-page-as
QUESTION
I am currently trying to automate Chrome Browser (Not Chrome Driver) on Ubuntu for saving the thousands of pages without Chrome Driver and Selenium which are somehow prohibited by the site.
In Mac OS, AppScript can handle Chrome without Chrome Driver and Selenium. And I succeed in automation of the downloading the page. However, I didn't find the alternatives of AppScript in Ubuntu.
Thus, I use keyborad automation tool (xdotool) by referring automate-save-page-as. It enables me to open a single page and save it to the storage, but it's too slow, unstable and hard to understand the code.
Is there any plausible way to automate chrome browser without using Selenium and Chrome Driver in Ubuntu? Or could any one give some hints to open multiple pages at the same time using xdotool and save it to local after a few seconds?
...ANSWER
Answered 2018-Oct-09 at 05:41I implement the solution for this problem. Check "ubuntu_automation_example_multiple.py".
https://github.com/jonghkim/browser-automation-beyond-firewall
I write two essential script files that are "save_page_as_multiple_open" and "save_page_as_multiple_save" by referring automate-save-page-as.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install automate-save-page-as
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page