Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content of xml <link> tag not extracted? #252

Open
anneb opened this issue Jan 14, 2020 · 1 comment
Open

content of xml <link> tag not extracted? #252

anneb opened this issue Jan 14, 2020 · 1 comment

Comments

@anneb
Copy link

anneb commented Jan 14, 2020

This RSS Feed returns a set of <item></item> elements. Every <item> element has subelements like <title>, <description> and <link>

I am able to extract the content of <title> and <description> but not from <link>

Am I missing something? Is this a feature or a bug? <link> is also a valid HTML element. Maybe osmosis is confusing xml with html?

I am using the following code:

const osmosis = require('osmosis');
const baseUrl = 'https://zoek.officielebekendmakingen.nl/rss?q=(available%3e=2020-01-14%20and%20available%3c=2020-01-14)and(((publicationName==%22Tractatenblad%22))or((publicationName==%22Staatsblad%22))or((publicationName==%22Staatscourant%22))or((publicationName==%22Gemeenteblad%22))or((publicationName==%22Provinciaal%20blad%22))or((publicationName==%22Waterschapsblad%22))or((publicationName==%22Blad%20gemeenschappelijke%20regeling%22)))';

let result = [];

osmosis
    .get(baseUrl)
    .find('item')
    .set({
        link: 'link',
        title: 'title',
        summary: 'description'
    })
    .data(res=>result.push(res))
    .done(()=>console.log(result));

The output of the above code shows titles and summaries but all links are empty.

@anneb anneb changed the title content xml <link> tag not extracted? content of xml <link> tag not extracted? Jan 15, 2020
@anneb
Copy link
Author

anneb commented Jan 19, 2020

This is likely a duplicate of (currently still open) #204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant