2

In Python, are there any modules for extracting plain urls from a string like Perl's URI::Find does?

Thanks.

matthias krull
  • 4,389
  • 3
  • 34
  • 54
wonnie
  • 459
  • 3
  • 6
  • 19

1 Answers1

3

Here is a regex which can help you find the urls in text. There is no famous package in python which does uri::find in plain text. The sphinx documentation project however, includes a builder called linkcheck which finds all the links and checks for validity. You can check it's source too, but the linked regex is somewhat simpler.

If you simply care about http and https, the answer is here.

Community
  • 1
  • 1
Senthil Kumaran
  • 54,681
  • 14
  • 94
  • 131