Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #547 // Extract number of total visitors

Lua code - Snippet-to-snippet

_, _, visitors = snippetText:find("<dd class=\"visitorsTotal\">(%d+)<")
if visitors then
  print("Total visitors: "..visitors)
  create {type="nt", text=visitors, title="Total blog visitors"}
else
  print "Number of total visitors not found"
end

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

3 comment(s) hidden. show

Snippet ID: #547
Snippet name: Extract number of total visitors
Eternal ID of this version: #547/1
Text MD5: 99d10e223709c083ea63d22e593b4ff8
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 20:03:04
Source code size: 251 bytes / 7 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 1118 / 175
Referenced in: [show references]