How to extract urls with python programming

How to extract urls with python programming
0
with open('page.html','r') as webpage:
     with open('newsalary.txt','a') as wf:
         for line in webpage.readlines():

after that how can I proceed my code?

if really you are trying to extract urls try bs4