diff options
Diffstat (limited to 'trunk/src/examples/scanYahoo.py')
-rw-r--r-- | trunk/src/examples/scanYahoo.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/trunk/src/examples/scanYahoo.py b/trunk/src/examples/scanYahoo.py deleted file mode 100644 index 825c169..0000000 --- a/trunk/src/examples/scanYahoo.py +++ /dev/null @@ -1,14 +0,0 @@ -from pyparsing import makeHTMLTags,SkipTo,htmlComment
-import urllib.request, urllib.parse, urllib.error
-
-serverListPage = urllib.request.urlopen( "http://www.yahoo.com" )
-htmlText = serverListPage.read()
-serverListPage.close()
-
-aStart,aEnd = makeHTMLTags("A")
-
-link = aStart + SkipTo(aEnd).setResultsName("link") + aEnd
-link.ignore(htmlComment)
-
-for toks,start,end in link.scanString(htmlText):
- print(toks.link, "->", toks.startA.href)
\ No newline at end of file |