wget - Wget converting links differently on different environments
问题描述
I set up a Ruby script to download and archive some pages of a website using Wget. We have a dockerized Rails application and we use Elastic Beanstalk to manage testing environments. The issue is that I have a different outcome in my test environment than in all the other environments, even if the Wget version is the same (1.18).
This is the command
docker exec -it xxxxxxxx sh -c 'wget -H -E -p -k -N --no-cookies --header "Cookie: myCookie=123" --timeout=2000 --restrict-file-names=windows --no-check-certificate -e robots=off "http://path.to/resource"'
where
-H (--span-hosts), -E (--adjust-extension), -p (--page-requisites), -k (--convert-links), -N (--timestamping)
and this is how links to stylesheets are correctly converted into relative, after downloading the CSS file
<link rel="stylesheet" media="all" href="../../assets/ss-standard-931774a45f6c2e79b3fb8ac6ce1eca4e4a9208b3c80a1c289f36b317b830db6b.css" />
but on that specific test environment, a .html
is appended
<link rel="stylesheet" media="all" href="../../assets/ss-standard-931774a45f6c2e79b3fb8ac6ce1eca4e4a9208b3c80a1c289f36b317b830db6b.css.html" />
couldn't find anything helpful so far... Any idea?
解决方案
推荐阅读
- jmeter - 在我们从 Jmeter 中的服务器获得完整响应之前,是否有任何响应?
- iot - 外部 MQTT 服务器订阅
- python - 在 Pandas 列中寻找与负值匹配的正值
- java - 无法将“下的属性绑定到 com.zaxxer.hikari.HikariDataSource:” Springboot
- c# - 从派生类对象访问重写的方法
- java - 我如何从带有 div 标签的下拉列表中选择元素
- scala - 在 scala spark 中读取如何创建文件夹日志
- android - 如何调试活动未呈现关联布局文件的原因
- flutter - 在颤动的网格视图中将最后一行项目居中
- javascript - 如何获取用户的输入以使用 JS 在视频进度上创建标记?