Skip to content

Fix IEEE Fetcher by enabling cookie support#3968

Merged
Siedlerchr merged 4 commits into
masterfrom
fixieee
Apr 20, 2018
Merged

Fix IEEE Fetcher by enabling cookie support#3968
Siedlerchr merged 4 commits into
masterfrom
fixieee

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Apr 20, 2018

Copy link
Copy Markdown
Member

Fixes #3966

Apparently when in VPN network of University IEEE fulltext fetcher needs cookie support enabled


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@Siedlerchr Siedlerchr requested a review from stefan-kolb April 20, 2018 11:07
}
}

// 12:50:19.221 GEThttps://ieeexplore.ieee.org/ielx7/6287639/7419931/07421926.pdf[HTTP/1.1 200 OK 8421ms]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these two lines

// Download the HTML page containing a frame with the PDF
String framePage = new URLDownload(BASE_URL + stampString).asString();
URLDownload dl = new URLDownload(BASE_URL + stampString);
dl.getCookieFromUrl(); //We don't need to modify the cookies, but we need support for them

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment in line before and add a space.

// Download the HTML page from IEEE
String resolvedDOIPage = new URLDownload(doi.get().getExternalURI().get().toURL()).asString();
URLDownload dl = new URLDownload(doi.get().getExternalURI().get().toURL());
dl.getCookieFromUrl();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add the comment here please

@stefan-kolb stefan-kolb added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 20, 2018
if (doi.isPresent() && doi.get().getDOI().startsWith(IEEE_DOI) && doi.get().getExternalURI().isPresent()) {
// Download the HTML page from IEEE
String resolvedDOIPage = new URLDownload(doi.get().getExternalURI().get().toURL()).asString();
URLDownload dl = new URLDownload(doi.get().getExternalURI().get().toURL());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename dl to something more meaningful

@Siedlerchr Siedlerchr merged commit 8bbc40e into master Apr 20, 2018
@Siedlerchr Siedlerchr deleted the fixieee branch April 20, 2018 14:53
Siedlerchr added a commit that referenced this pull request Apr 21, 2018
* upstream/master:
  Fix IEEE Fetcher by enabling cookie support (#3968)
  Update flowless from 0.6 -> 0.6.1
  Update wiremock from 2.16.0 -> 2.17.0
  Fix ebook.de (#3967)
Siedlerchr added a commit that referenced this pull request Apr 25, 2018
* upstream/master: (47 commits)
  Fix xmp exporter (#3964)
  Update JUnit from 5.2.0-M1 -> 5.2.0-RC1
  Update xmlunit from 2.5.1 -> 2.6.0
  Update mockito-core from 2.18.0 -> 2.18.3
  Fixieee (#3970)
  Fix IEEE Fetcher by enabling cookie support (#3968)
  Update flowless from 0.6 -> 0.6.1
  Update wiremock from 2.16.0 -> 2.17.0
  Fix ebook.de (#3967)
  LOC test #3854
  Fix arxiv tests
  New translations JabRef_en.properties (French) (#3963)
  Upgrade modernizer plugin
  New Crowdin translations (#3962)
  Fix test
  Improve test
  New Crowdin translations (#3961)
  New translations JabRef_en.properties (French) (#3960)
  Remove brackets before checking equality
  Replace all IEEE URLs with https #3930 (#3944)
  ...

# Conflicts:
#	build.gradle
#	src/main/java/org/jabref/gui/BasePanel.java
#	src/main/java/org/jabref/gui/actions/CleanupAction.java
#	src/main/java/org/jabref/gui/collab/ChangeScanner.java
#	src/main/java/org/jabref/gui/exporter/ExportAction.java
#	src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditorViewModel.java
#	src/main/java/org/jabref/gui/openoffice/DetectOpenOfficeInstallation.java
#	src/main/java/org/jabref/gui/openoffice/OpenOfficeSidePanel.java
#	src/main/java/org/jabref/gui/preftabs/PreferencesDialog.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants