Site icon CodeRevolution Support

How to remove specific html attributes from content crawling

Hi, I used //div[@id='procuct-table'] to crawl a spec list from a page. But there is a class which will cause the list will be hidden on my page. class="tab-pane fade py-sm-5". I can't strip the whole html because it's a table list.. Is it possible to only remove this class attributes when crawling?   Here is the content table I crawled for reference: https://sanlux.com.tw/product-detail/600 <div id="procuct-table" class="tab-pane fade py-sm-5" role="tabpanel" aria-labelledby="nav-profile-tab"> <table id="tab" class="tableCompare indetail table"> <tbody> <tr class="tr2" data-rttitle="Spec"> <td class="sort-leA text-sm-end text-center pe-sm-3">Spec</td>.......   Thanks, Luke
Exit mobile version