Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
Create delicious.py
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbailey authored Jun 11, 2016
1 parent 468c345 commit 938d0bb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions delicious.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import re

title_pattern = '" PRIVATE="0" TAGS="">(.*)</A>'
link_pattern = '<DT><A HREF="(.*)" ADD_DATE.*'
date_pattern = 'ADD_DATE="(.*)" PRIVATE="0"'

with open('Desktop/delicious.html') as f:
for line in f:
title = re.search(title_pattern,line).group(1)
link = re.search(link_pattern,line).group(1)
date = re.search(date_pattern,line).group(1)
print("\"" + title + "\",\"" + link + "\"," + date)

0 comments on commit 938d0bb

Please sign in to comment.