1 | _, _, url = (snippetTitle.."\n"..snippetText):find("(http://[^\r\n \t]+)") |
2 | if not url then |
3 | error("No URL found in snippet "..snippetID) |
4 | end |
5 | |
6 | text = loadURL(url) |
7 | print("Text length: "..#text) |
8 | |
9 | create {type='nt', text=text, title='Contents of '..url..' for '..snippetID} |
e.g. for #2000303
test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #546 |
Snippet name: | URL getter |
Eternal ID of this version: | #546/1 |
Text MD5: | 6d7f856e34fa897426ef3eed68125679 |
Author: | stefan |
Category: | |
Type: | Lua code - Snippet-to-snippet |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-03-22 17:46:22 |
Source code size: | 278 bytes / 9 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 882 / 198 |
Referenced in: | [show references] |