FAZ.NET

4 views
Skip to first unread message

adamsmith

unread,
Jun 14, 2011, 12:54:16 AM6/14/11
to zotero-dev
OK, so I lied.
The FAZ translator is great, but it failed ugly on me because the
xpath for the date was off.
Here's a fix
https://gist.github.com/1024336
only l. 81 is changed

I can't get search to work - it fails silently, claiming success.

Avram Lyon

unread,
Jun 14, 2011, 2:22:09 AM6/14/11
to zoter...@googlegroups.com

Please go to http://github.com/ajlyon/zotero-bits/raw/master/FAZ.NET.js
and save the file to the translators directory of your Zotero data
directory (http://www.zotero.org/support/zotero_data).

Dates and search results should start working again. If this works for
you, please post here so that I can submit this change to be pushed to
all users.

Avram

adamsmith

unread,
Jun 14, 2011, 9:15:43 AM6/14/11
to zotero-dev
perfect, thanks. Now I'll try to understand what you did there...

On Jun 14, 1:22 am, Avram Lyon <ajl...@gmail.com> wrote:
> On Tue, Jun 14, 2011 at 8:54 AM, adamsmith <bst...@gmx.de> wrote:
> > OK, so I lied.
> > The FAZ translator is great, but it failed ugly on me because the
> > xpath for the date was off.
> > Here's a fix
> >https://gist.github.com/1024336
> > only l. 81 is changed
>
> > I can't get search to work - it fails silently, claiming success.
>
> Please go tohttp://github.com/ajlyon/zotero-bits/raw/master/FAZ.NET.js

Avram Lyon

unread,
Jun 14, 2011, 9:23:02 AM6/14/11
to zoter...@googlegroups.com
On Tue, Jun 14, 2011 at 5:15 PM, adamsmith <bst...@gmx.de> wrote:
> perfect, thanks. Now I'll try to understand what you did there...

The translator uses the getItemArray function, which is very rarely
used, and which I‌ had even overlooked in the translator coding
documentation. There are docs there now:
http://www.zotero.org/support/dev/translators/coding#utility_functions

It was throwing away the correct search results -- I tweaked the
regex, and now it works!

Avram

adamsmith

unread,
Jun 14, 2011, 10:03:54 AM6/14/11
to zotero-dev
ah yes, I see - I didn't get why there was a regexp in the end in the
first place, thanks for explaining/documenting.
> Avramo

ibex

unread,
Jun 26, 2011, 2:05:40 AM6/26/11
to zotero-dev
I've remarked that the FAZ.net changed their site.

Thanks for already fixing the translator.

The version http://github.com/ajlyon/zotero-bits/raw/master/FAZ.NET.js
returns the following date
13. Juni 2011 2011-06-13 06:00:00

I've improved your version in https://gist.github.com/1047276
The result is now:
2011-06-13

I've tested the search fix with
http://www.faz.net/f30/common/Suchergebnis.aspx?term=philosophie&x=9&y=12&allchk=1
The search returns 5 out of 10 results. But this is ok, as only 5
articles have free access.

Will you commit a fixed version to svn?

Avram Lyon

unread,
Jul 1, 2011, 2:55:37 AM7/1/11
to zoter...@googlegroups.com
Updated, tests added, committed.

Thanks!

> --
> You received this message because you are subscribed to the Google Groups "zotero-dev" group.
> To post to this group, send email to zoter...@googlegroups.com.
> To unsubscribe from this group, send email to zotero-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/zotero-dev?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages