Title: [Plugin: WP Web Scraper] regex_replace
Last modified: August 20, 2016

---

# [Plugin: WP Web Scraper] regex_replace

 *  [adampembs](https://wordpress.org/support/users/adampembs/)
 * (@adampembs)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-web-scraper-regex_replace/)
 * Got the scraper to pull posts from a local news site, but the links are all relative
   urls, so they default to the local site. I need to replace
    <a href=” with <a
   href=”[http://www.westerntelegraph.co.uk](http://www.westerntelegraph.co.uk)
 * thanks for any help
 * Adam
 * [http://wordpress.org/extend/plugins/wp-web-scrapper/](http://wordpress.org/extend/plugins/wp-web-scrapper/)

Viewing 1 replies (of 1 total)

 *  [nothingless](https://wordpress.org/support/users/nothingless/)
 * (@nothingless)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-web-scraper-regex_replace/#post-2717700)
 * According to the manual, there’s a parameter created just for that:
 * > **basehref**: A parameter which can be used to convert relative links from 
   > the scrap to absolute links. For example, basehref=”[http://yahoo.com&#8221](http://yahoo.com&#8221);,
   > will convert all relative links to absolute by appending [http://yahoo.com](http://yahoo.com)
   > to all href and scr values. Note that basehref needs to be complete path (with
   > http) and no trailing slash.
 * Example:
 * `[wpws url="http://site.com/" basehref="http://www.westerntelegraph.co.uk" selector
   =".preview"]`

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP Web Scraper] regex_replace’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-web-scrapper.svg)
 * [WP Web Scraper](https://wordpress.org/plugins/wp-web-scrapper/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-web-scrapper/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-web-scrapper/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-web-scrapper/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-web-scrapper/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-web-scrapper/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nothingless](https://wordpress.org/support/users/nothingless/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-web-scraper-regex_replace/#post-2717700)
 * Status: not resolved