grumpyp / backlink-checker

Check your exchanged and bought backlinks, are they still online?
MIT License
7 stars 2 forks source link

check if the backlinks are dofollow #2

Open grumpyp opened 2 years ago

grumpyp commented 2 years ago

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 for sponsored 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")

ghost commented 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')

grumpyp commented 2 years ago

@peterkr10 feel free to solve that issue and pull-request.