10
5
If I have a .txt file containing a list of URLs, how can I get Chrome or Firefox to open them, one URL per tab and then save the page in each tab separately?
Any platform will do: Windows, Mac, Linux.
10
5
If I have a .txt file containing a list of URLs, how can I get Chrome or Firefox to open them, one URL per tab and then save the page in each tab separately?
Any platform will do: Windows, Mac, Linux.
9
Opening the URLs in tabs can be done just pasting in a console prompt cmd
your URLs like this.
start chrome http://yoururls/foo.html &
start chrome http://yoururls/bar.html &
.
.
.
or
start firefox http://yoururls/foo.html &
start firefox http://yoururls/bar.html &
.
.
.
8
Although the question specifically mentions Chrome and Firefox, if what you are trying to do is to save the content of each page, wget is made for this task. E.g.:
wget --input-file=list_of_urls.txt
You can even specify a specific user-agent in case you want the server to see the request as a certain browser:
wget --user-agent=some_specific_user_agent_string --input-file=list_of_urls.txt
7
Answering my own question, I was unsure of some plug-ins I had already seen but a closer look confirmed that they should do the job.
Two stages:
1) Run Firefox or Chrome from the command line, passing in the list of sites as parameter or a file containing a list, using one of the following methods:
2) Then use one of the following plug-in as appropriate to save all the contents of each tab
Firefox:
https://addons.mozilla.org/en-US/firefox/addon/unmht/
Quoted from the plug-in page (particular features of interest for this question):
About this Add-on: UnMHT provides following features:
- Save webpage as MHT file.
- Insert URL of the webpage and date you saved into saved MHT file.
- Save multiple tabs as MHT files at once.
- Save multiple tabs into a single MHT file.
- Save webpage by single click into prespecified directory with Quick Save feature.
- Convert HTML files and directory which contains files used by the HTML into MHT file.
- View the MHT file saved by UnMHT, IE, PowerPoint, etc.
Chrome: Extension: ZipTabs https://chrome.google.com/webstore/detail/ziptabs/ccnanbffbfbcgfmmkgejodommhidpjba
From the extension page:
- save multiple opened pages into a zip file containing single HTML files with all resources included (images, stylesheets, frames...)
- open a zip file containing archives into tabs Notes:
- this extension needs "SingleFile Core" to be already installed (follow install instructions)
1
Getting all of the tabs to open separate through batch isn't too hard.
Code:
@echo off
open chrome [enter URL 1]
open chrome [enter URL 2]
...
exit
As for the saving, not sure if it's possible through batch. I could be wrong though.
One way would be to use a multiple url opener tool to automatically open all links within a text and then save them individually.
– Shan Eapen Koshy – 2015-11-09T12:48:49.507Found another multiple url opener site http://www.urlopener.com/homepage.html not sure what characters it recognizes as entry separators though.
– user3015682 – 2017-09-13T15:04:02.490