jeudi 29 juin 2017

Python: search for html tag starting with characters

I am using the following code to find a tag with class "product-category".

soup0.findAll("a",{"class":"product-category"})

How do i write if I need to find a tag whose class starts with product-category. I tried using

soup0.findAll("a",{"class":%"product-category"}) ##This doesnt work.

Is there any way?

Thanks,




Aucun commentaire:

Enregistrer un commentaire