WordPress.org

Ready to get started?Download WordPress

Forums

WP Web Scraper
Can't outupu accents (6 posts)

  1. Diana
    Expert e diva
    Posted 1 year ago #

    Thanks for this plugins, works very well!

    I just can't output text with accents, e.g. [wpws url="http://br.forums.wordpress.org/profile/dianakc" selector="#user-replies" urldecode="1"]

    http://wordpress.org/extend/plugins/wp-web-scrapper/

  2. dorianj
    Member
    Posted 1 year ago #

    Try using the xpath instead and see if that works. Unfortunately, there's no documentation that explains how to use xpath in the shortcode. My guess would be this...

    [wpws url="http://br.forums.wordpress.org/profile/dianakc" xpath="//*[@id="user-replies"]" urldecode="1"]

  3. Diana
    Expert e diva
    Posted 1 year ago #

    Hi, thanks for help but it gets the whole page, I think there is no way to get a node, because is not a xml ?!

  4. dorianj
    Member
    Posted 1 year ago #

    You can use the xpath to access html. I do it all the time, except I use it in the template, not shortcode. Perhaps the shortcode example I provided is getting confused because of the "quotes". Maybe something like this might work...

    [wpws url="http://br.forums.wordpress.org/profile/dianakc" xpath="//*[@id=\"user-replies\"]" urldecode="1"]

    or...
    [wpws url="http://br.forums.wordpress.org/profile/dianakc" xpath="//*[@id=\"pagebody\"]/div[4]/div[3]" urldecode="1"]

    If that doesn't work, then try changing the word "xpath" to "selector". I wish the developer of this plugin could provide some more examples of usage.

  5. dorianj
    Member
    Posted 1 year ago #

    This works!

    [wpws url="http://br.forums.wordpress.org/profile/dianakc" selector="#user-replies ol:eq(0)"]
  6. Diana
    Expert e diva
    Posted 1 year ago #

    Hi,

    The first example I posted works ok, problem are accents :( I think the plugin can't parse latin characters :( Even with xpath though.

    Tried utf8, null everything but still I got strange characters, both page and feed are utf-8, don't know what happens.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.