WP Web Scraper
regex_replace (2 posts)

  1. adampembs
    Posted 4 years ago #

    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

    thanks for any help



  2. nothingless
    Posted 3 years ago #

    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", will convert all relative links to absolute by appending http://yahoo.com to all href and scr values. Note that basehref needs to be complete path (with http) and no trailing slash.


    [wpws url="http://site.com/" basehref="http://www.westerntelegraph.co.uk" selector=".preview"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Web Scraper
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic