Extracting data from HTML table

A Python solution using BeautifulSoup4 (Edit: with proper skipping. Edit3: Using class=”details” to select the table): from bs4 import BeautifulSoup html = “”” <table class=”details” border=”0″ cellpadding=”5″ cellspacing=”2″ width=”95%”> <tr valign=”top”> <th>Tests</th> <th>Failures</th> <th>Success Rate</th> <th>Average Time</th> <th>Min Time</th> <th>Max Time</th> </tr> <tr valign=”top” class=”Failure”> <td>103</td> <td>24</td> <td>76.70%</td> <td>71 ms</td> <td>0 ms</td> <td>829 ms</td> </tr> … Read more

CentOS directory structure as tree?

If tree is not installed on your Centos system (I typically recommend server setups to use minimal install disk anyhow) you should type the following at your command line: # yum install tree -y If this doesn’t install it’s because you don’t have the proper repository. I would use the Dag Wieers repository: http://dag.wieers.com/rpm/FAQ.php#B After … Read more

for each dir create a tar file

The script that you wrote will not work if you have some spaces in a directory name, because the name will be split, and also it will tar files if they exist on this level. You can use this command to list directories not recursively: find . -maxdepth 1 -mindepth 1 -type d and this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)