zotero / translators

Zotero Translators
http://www.zotero.org/support/dev/translators
1.19k stars 742 forks source link

Fix APA PsycNET `fulltext` match issue #3276

Closed const7 closed 3 months ago

const7 commented 3 months ago

Fix the APA PsycNET save issue when URL containing fulltext (#1676, the buy issue has been fixed by others) Example URL: https://psycnet.apa.org/fulltext/2022-40433-002.html

const7 commented 3 months ago

I'm not sure what caused the test failure here. The test cases work fine in the local browser (but not in the Scaffold). Is there any simple way to run the same test in the local environment?

alex-ter commented 3 months ago

That timeout in the PR check looks similar to that neverending "Loading..." in the Scaffold's Browser tab (and the tests don't work for me too there), and based on other comments in the translator file, looks like that website has some anti-scraping stuff going on, which is probably the reason.

Anyway, I tested this manually via a browser, works as claimed.

I'd suggest adding that test URL somewhere into the test set, maybe at least as a comment, so that it at least could be checked manually when needed (there's no test case for /fulltext/ as of right now).

alex-ter commented 3 months ago

BTW, looks like the website does load in Zotero 7's Scaffold version, so that may be the way to add that new test.

AbeJellinek commented 3 months ago

Thanks, looks good once we have a test case.

const7 commented 3 months ago

thanks for your help and the test case for /fulltext/ has been added.

alex-ter commented 3 months ago

Checked out the added test - works for me.