Link in Ad Paragraph hides its attributes

41 Views Asked by At

I am currently creating a webscraper and playing around the blog techcrunch. While trying to retrieve the data from a specific blogpost I encounter a few ads, that I want to filter out. Filter for ads I am trying to differentiate between links inside of the article and links in the ads to solve the problem. Unfortunately the classname of the ad-link is not retrieved inside the child attributes, while the content-link contains its classname. Ad-Link Content-Link

I tried to extract the classname of the ad-link, but they were the only classnames not beeing retrieved.

1

There are 1 best solutions below

0
On

I solved the problem by checking the element.DOM.Parent() element