Remove --dump-raw option.

It doesn't work and users can easily fetch the raw html
with wget, curl or even the browser anyways.
This commit is contained in:
King_DuckZ 2020-02-19 17:13:34 +01:00
parent 3dcbd48067
commit 54ac44b81d
3 changed files with 1 additions and 8 deletions

View file

@ -31,9 +31,9 @@ add_executable(${PROJECT_NAME}
src/scraplang/parse_exports.cpp
src/scraplang/parse.cpp
src/scraplang/apply.cpp
src/scraplang/xpath_runner.cpp
src/xpath.cpp
src/read_all.cpp
src/scraplang/xpath_runner.cpp
)
target_include_directories(${PROJECT_NAME} SYSTEM

View file

@ -47,7 +47,6 @@ namespace duck {
("help,h", "Produces this help message")
("version", "Prints the program's version and quits")
("dump,d", po::value<std::string>(), "Cleans the retrieved html and saves it to the named file; use - for stdout")
("dump-raw,D", po::value<std::string>(), "Saves the retrieved html to the named file; use - for stdout")
;
po::options_description query_options("Query options");
query_options.add_options()

View file

@ -16,7 +16,6 @@
* along with DuckScraper. If not, see <http://www.gnu.org/licenses/>.
*/
#include "htmlretrieve.hpp"
#include "commandline.hpp"
#include "xpath.hpp"
#include "scraplang.hpp"
@ -88,11 +87,6 @@ namespace {
const auto in_html_id = html_pool.GetOrAdd(url);
std::string html = *html_pool.GetByID(in_html_id);
if (vm.count("dump-raw")) {
dump_string(vm["dump-raw"].as<std::string>(), html);
}
html = duck::clean_html(std::move(html));
if (vm.count("dump")) {
dump_string(vm["dump"].as<std::string>(), html);
}