mardi 27 novembre 2018

check HTML table with Python

Is it possible to read an HTML with Python and check with "if" a table data if it is true?For example:

I have this HTML:

<!DOCTYPE html>
<html>
<head>
        <title>J-Vas Beat Productions</title>
</head>
<body>
        <table style="width:100%">
                <tr>
                <th>Beat Name</th>
                <th>Producer</th> 
                <th>Beat Type</th>
                <th>Price</th>
                </tr>
                <tr>
                <td>here is name</td>
                <td>here is prod</td> 
                <td><a href="#">oldschool</a></td>
                <td>here is price</td>
                </tr>
                <tr>
                <td>here is name</td>
                <td>here is prod</td> 
                <td><a href="#">newschool</a></td>
                <td>here is price</td>
                </tr>
                <tr>
                <td>here is name</td>
                <td>here is prod</td> 
                <td><a href="#">boombap</a></td>
                <td>here is price</td>
                </tr>
        </table>
</body>
</html>

Can somehow check with Python if "Beat Type" is "old school" then enter to the link?

Aucun commentaire:

Enregistrer un commentaire