Libraryless. Click here for Pure Java version (3495L/24K).
sS loadPageAndStore_once(S url) { File f = defaultPlaceForStoredWebPage(url); if (f.exists()) ret loadTextFile(f); S page; try { page = loadPage(url); } catch e { print(e); page = "ERROR: " + e; } saveTextFile(f, page); saveTextFile(replaceExtension(f, ".url"), url); ret page; }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1023829 |
Snippet name: | loadPageAndStore_once - load page and store in a file derived from URL, or get from disk |
Eternal ID of this version: | #1023829/4 |
Text MD5: | 8647b37502832afe399ea71065daa7f5 |
Transpilation MD5: | 323320f663193f3aa99c9b2b3d88a62c |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-11 12:54:57 |
Source code size: | 322 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 272 / 385 |
Version history: | 3 change(s) |
Referenced in: | [show references] |