Open grumpyp opened 2 years ago
I was thinking the same thing.
link = soup.find_all('a', href=""+do_check[1]+"")
try:
rel = link.get('rel')
except AttributeError NoneType:
print('is DoFollow') # no rel? is dofollow by default
if rel contains 'no-follow':
print('is NoFollow')
@peterkr10 feel free to solve that issue and pull-request.
As I got an intresting proposal to actually check wheather the link we're checking is dofollow or not, this should be implemented.
So make sure, that the link which is checked on the website we get the response of is dofollow.
My approach would be:
use
beautifulsoup
and look for the all links, then check forsponsored and nofollow
, which we don't want our backlinks to be.if this isn't the case, print ok, otherwise
print("---link marked as nofollow or sponsored")