Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------xerpi (c) 2011 -------------------------
- function get_bookmarks()
- local tab = {}
- local posi = 0
- local posf =0
- local pos2i = 0
- local pos2f =0
- local url = ""
- local name = ""
- local i =0
- if files.exists("ms0:/PSP/SYSTEM/BROWSER/bookmarks.html") then
- for linea in io.lines("ms0:/PSP/SYSTEM/BROWSER/bookmarks.html") do
- i = i+1
- a,b = string.find(linea,'HREF="')
- if a and b then
- posi=b+1
- c,d = string.find(linea,'"',posi+1)
- if c and d then
- posf =d-1
- url = string.sub(linea,posi,posf)
- e,f = string.find(linea,'>',posf+1)
- if e and f then
- pos2i = f+1
- g,h = string.find(linea,'</A>',pos2i)
- if g and h then
- pos2f = g-1
- name = string.sub(linea,pos2i,pos2f)
- end
- end
- table.insert(tab,{url=url,name=name})
- end
- end
- end
- return tab
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement