I have a HTML file I got from Wikipedia and would like to find every link on the page such as /wiki/Absinthe
and replace it with the current directory added to the front such as /home/fergus/wikiget/wiki/Absinthe
so for:
<a href="/wiki/Absinthe">Absinthe</a>
becomes:
<a href="/home/fergus/wikiget/wiki/Absinthe">Absinthe</a>
and this is throughout the whole document.
Do you have any ideas? I'm happy to use BeautifulSoup or Regex!