lynx

Lynx with javascript

安稳与你 提交于 2020-06-10 02:11:46
问题 So I wrote a script in PHP that requires javascript to run with it. I've had a hard time finding the solution on how to run the javascript with php at the same time using some linux tool to make it automatic (since running it in my browser isn't a choice, I need it to be a crontab). Using the "php" command isn't a choice either since it does not run javascript. So I found a solution, it was lynx. So here is my problem: for some reason, the javascript runs in my browser just fine, but not in

详解PHP设置定时任务的实现方法

那年仲夏 提交于 2020-05-05 19:56:35
详解PHP设置定时任务的实现方法 一、总结 一句话总结: 1、 ignore_user_abort(true) 是什么意思? 无论客户端是否关闭浏览器,下面的代码都将得到执行 2、 set_time_limit(0) 是什么意思? 脚本执行没有时间方面的限制,也就是可以一直执行,默认php脚本最大执行30秒。 二、详解PHP设置定时任务的实现方法 定时运行任务对于一个网站来说,是一个比较重要的任务,比如定时发布文档,定时清理垃圾信息等,现在的网站大多数都是采用PHP动态语言开发的,而对于PHP的实现决定了它没有Java和.Net这种AppServer的概念,而http协议是一个无状态的协议,PHP只能被用户触发,被调用,调用后会自动退出内存,没有常驻内存。 如果非要PHP去设置定时任务, 可以有以下三个方法: 1、用户触发定时 通过挂载到网页里面, 判断当前的时间,然后运行PHP代码 ,缺点是每一次加载网页,都需要加载这个PHP页面,而对于人气不旺的网站,这样的延时可能会更加的严重,毕竟是用户的HTTP请求去触发这个PHP代码的运行, Discuz!论坛程序是判断在00:00之后,第一个用户访问请求去执行定时的PHP代码 。 2、常驻内存运行 PHP是可以常驻内存运行程序的,下面的这段代码,可以在当前文件夹下,生成一个 test.txt ,并每隔20秒,往里面写入一个时间戳

如何为屏幕指定名称? [关闭]

删除回忆录丶 提交于 2020-02-27 16:01:41
我在命令shell上使用 screen 多路复用器工具并打开很多屏幕。 然后我忘记哪个进程ID与哪个任务相关联。 我想为屏幕设置名称,但在联机帮助页中找不到选项。 目前,列出屏幕如下所示: There are screens on: 5422.pts-1.aws1 (Detached) 5448.pts-1.aws1 (Detached) 5027.pts-1.aws1 (Detached) 3 Sockets in /var/run/screen/S-sb. 我希望看到这样的事情: There are screens on: 5422.logCleanWorker (Detached) 5448.overNightLongTask(Detached) 5027.databaseOverNightLongTask (Detached) 3 Sockets in /var/run/screen/S-sb. 我怎样才能做到这一点? #1楼 最简单的方法是使用名称屏幕 screen -S 'name' 'application' Ctrl + a , d =退出并保持应用程序打开 返回屏幕: screen -r 'name' 例如使用lynx与屏幕 创建屏幕: screen -S lynx lynx Ctrl + a , d =退出 以后你可以回复: screen -r lynx #2楼

legality of div tag immediately under html tag

我的梦境 提交于 2020-01-17 06:58:48
问题 I was running lynx to test some HTML I had to do, because having accessibility in mind. I guessed that, if looked pretty in Lynx, the whole range of screen readers, crappy phones and other stuff would do OK, even most ancient hardware. In some cases I was using a shortcut in case I wanted to wipe out all static HTML at a once for the regular case of when JS is supported and enabled, consisting in nesting all the static HTML tags in an identified div tag to be wiped out. Later I realized that

Script to Mobile-Friendly test

喜夏-厌秋 提交于 2019-12-31 17:25:14
问题 I wanted to write a shell/python script which will check if a website is mobile friendly or not. Using browser this can be easily done by visiting- https://www.google.com/webmasters/tools/mobile-friendly/?url=<website_addr> For eg.- https://www.google.com/webmasters/tools/mobile-friendly/?url=http://facebook.com I tried fetching the content through curl, wget , lynx commands but it did not worked. How can I do so? 回答1: Sanchit, I suggest you look at the requests library for retrieving the url

Script to Mobile-Friendly test

旧街凉风 提交于 2019-12-31 17:24:34
问题 I wanted to write a shell/python script which will check if a website is mobile friendly or not. Using browser this can be easily done by visiting- https://www.google.com/webmasters/tools/mobile-friendly/?url=<website_addr> For eg.- https://www.google.com/webmasters/tools/mobile-friendly/?url=http://facebook.com I tried fetching the content through curl, wget , lynx commands but it did not worked. How can I do so? 回答1: Sanchit, I suggest you look at the requests library for retrieving the url

How to convert a link that has javascript:__doPostBack in href to normal url which wget/curl/lynx can understand?

本小妞迷上赌 提交于 2019-12-23 03:55:08
问题 I searched in SO first, and found this question. How to click a link that has javascript:__doPostBack in href? but it gives the answer in python only. What I need is, when go through a website, some pages (2,3,4, etc) with links like below: javascript:__doPostBack('AspNetPager1','2') javascript:__doPostBack('AspNetPager1','3') javascript:__doPostBack('AspNetPager1','4') If I click it, and it will display the next page, but the real url isn't displayed in browser. So my questions is, how can I

Using lynx in a shell, store dump for further grep

a 夏天 提交于 2019-12-07 14:22:46
问题 is it possible in bash script to do something like get web page content as a browser using lynx store it in a variable (actually only one network access to the page) and then do many grep to extract information ? i have tried things like : content="$(lynx -dump -nolist $url')" var1=`cat "$content" | grep myre1` var2=`cat "$content" | grep myre2` but i mess up between assignations, using quotes, backquotes and so on. if someone have another solution without lynx: i am searching for something

Creating a static copy of a web page on UNIX commandline / shell script

眉间皱痕 提交于 2019-12-06 09:15:33
问题 I need to create a static copy of a web page (all media resources, like CSS, images and JS included) in a shell script. This copy should be openable offline in any browser. Some browsers have a similar functionality (Save As... Web Page, complete) which create a folder from a page and rewrite external resources as relative static resources in this folder. What's a way to accomplish and automatize this on Linux command line to a given URL? 回答1: You can use wget like this: wget --recursive -

Using lynx in a shell, store dump for further grep

扶醉桌前 提交于 2019-12-05 22:44:48
is it possible in bash script to do something like get web page content as a browser using lynx store it in a variable (actually only one network access to the page) and then do many grep to extract information ? i have tried things like : content="$(lynx -dump -nolist $url')" var1=`cat "$content" | grep myre1` var2=`cat "$content" | grep myre2` but i mess up between assignations, using quotes, backquotes and so on. if someone have another solution without lynx: i am searching for something like lynx --dump that is "browser rendering view" (and not wget ) and preferably would avoid creating a