我正在尝试使用python机械化模块在网站上自动化一个过程。
使用以下代码,我将刷新站点,直到找到我想要遵循的链接:
for link in br.links():
valuable = filter(lambda tpl: tpl[0]=='href', link.attrs)
if len(valuable) == 0:
continue
if 'book.php' in valuab
我正在运行Ubuntu16.04,当我试图解压linux时-4.4.0-66-泛型apt挂起。我终止了apt进程,删除了陈旧的锁文件,然后运行:
sudo apt-get clean
sudo dpkg --configure -a
结果是:
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 4.4.0.66.70);
however:
Version of linux-headers-generic on sys
我需要将几个文件复制到远程服务器。
for database in `mysql -Bse"show databases" | grep '^us' `
do
time scp $database.gz gs://tbl_name/ &
done
我使用&将进程推送到后台,以便脚本可以继续处理下一个文件。问题是,由于网络问题,十分之一的文件无法传输。但是我无法检查返回代码,因此不知道哪些文件失败了。