Web Scraper Shortcode
[plugin: web scraper shortcode] how to set base url for links (2 posts)

  1. fizzyfozzy
    Posted 3 years ago #

    I am using this plugin to scrap another webpage into my own, however the links on the page are absolute and so are trying to look for the file on my domain rather than the one I have scraped.
    Is there anything I can do to get around this?


  2. ConRockets
    Posted 3 years ago #

    You can use the <base href="website.com"> attribute in the <head> section of your Header. This will only work for 1 URL, however, as you're only allowed one <base> tag and will likely break other links. Chrome and Firefox tend to support it even if you put the <base> tag in the body as of this writing, but IE 10 doesn't. This isn't proper structure, though so I wouldn't recommend using it. Other than that, I've found nothing. Maybe a short Javascript?

Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic