On Feb 13, 2:49 pm, Lynda Howell <
howel...@gmail.com> wrote:
> I've just reconfirmed that I'm getting the proxied version of the URL saved
> in the Zotero reference. I'm not using Scaffold, just Firefox 10.0.1 and
> Zotero 3.0.1 on Windows 7. (I've disabled all other add-ons.)
>
> The site I'm working with (
http://clientcenter.serialssolutions.com) is a
> little different from most I've written translators for because the site
> itself is not proxied, but many of the URLs it lists are. I've uploaded my
> draft translator tohttps://
gist.github.com/1818789(line 132 is where it's
> dealing with the URL). In most cases, the URL I'm saving is not the URL of
> the page being scraped.
>
> When I load a page onhttp://
search.ebscohost.com(for example) in Firefox,
> Zotero automatically redirects me to the login page for my proxy (
http://www.myunion.edu/library-login.aspx?url=http://search.ebscohost...).
> The site I'm working with is giving URLs in the formathttp://
www.myunion.edu/library-login.aspx?url=http://search.ebscohost...,
> and I'm hoping to have my translator savehttp://
search.ebscohost.com.
>
> Thanks for your help.
>
> Lynda.
>
>
>
>
>
>
>
> On Mon, Feb 13, 2012 at 2:04 PM, Avram Lyon <
ajl...@gmail.com> wrote:
> > I thought this was being done automatically by Zotero-- can you
> > confirm that it isn't? It's possible that the proxies aren't being
> > stripped out when you use Scaffold, but I think it works in normal
> > usage.
>
> > Avram
>
> > On Mon, Feb 13, 2012 at 10:59 AM, Lynda Howell <
howel...@gmail.com> wrote:
> > > I'm writing a web translator for a site that lists proxied URLs, but I
> > > want to save the un-proxied versions in Zotero so that bibliographic
> > > citations generated from the references include the generic version.
> > > Is there a standard way to de-proxy URLs from within a web translator?
>
> > > I see references in the Firefox console to
> > > Zotero.Proxies.proxyToProper, which looks like it does exactly what I
> > > want when Zotero is searching for an appropriate translator to apply
> > > to a page. Is it possible to call this from within my translator?
> > > I've tried something like newItem.url =
> > > Zotero.Proxies.proxyToProper(theBadURL); but that tells me
> > > Zotero.Proxies is undefined. What am I missing?
>
> > > I could manually de-proxy the URLs, but that requires me to hard code
> > > formats I'd rather let Zotero handle if I can.
>
> > > Lynda.
Few functions are exposed to the translator sandbox.
Zotero.Proxies.proxyToProper() is not one of them, and the solution
isn't as easy as exposing it to translators, because connectors use a
very different system for detecting proxies.
We should automatically deproxying URLs on save, but if this worked
before I probably broke it during refactoring for the connectors in
3.0. I will fix it, but the fix is non-trivial and probably won't land
before Zotero 3.5.
Simon