Evg
Evg

Reputation: 3080

page external links count in python

I need such functions in python:

-check external links count on site pages.

-check if some link is present on given page or not.

Does anybody know good solutions/libs for this task? I think i should use BeautifulSoup here.., may be something more lib can help?

Upvotes: 1

Views: 535

Answers (1)

pyfunc
pyfunc

Reputation: 66729

You should be able to use urllib2 module to fetch the page, use beautifulsoup to parse the page and extract the links, store it up in list and match them to check for some existing link. There are number of questions on BeautifulSoup on SO itself.

Upvotes: 1

Related Questions