https://github.com/dotpot/fastlinks
Fast links parser for Python & Humans
https://github.com/dotpot/fastlinks
Last synced: 10 months ago
JSON representation
Fast links parser for Python & Humans
- Host: GitHub
- URL: https://github.com/dotpot/fastlinks
- Owner: dotpot
- Created: 2012-02-25T06:49:56.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-12-27T20:51:59.000Z (over 13 years ago)
- Last Synced: 2025-06-04T17:10:23.546Z (about 1 year ago)
- Language: Python
- Size: 115 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##FastLinks
*Missing simple links parser for python & humans*
Use this component if you want to get **http links** from content in a **fast** ( **very** ) way.
###Overview
Imagine you have this html content:
src='/clickme.php?id=10&stats=23d'
URL="http://www.testsite.com/verygood.html"
href='www.testsite.com/hello placentas/word.htm'
href='../test.html'
And all you want to do is just get list of normal looking links from it.
###You can do it now!!
just:
links = get_links(content, 'http://www.testsite.com/')
#### Isn't that trolololowesome ?!
output:
[1] http://www.testsite.com/test.html
[2] http://www.testsite.com/hello placentas/word.htm
[3] http://www.testsite.com/favicon.ico
[4] http://www.testsite.com/verygood.html
[5] http://www.testsite.com/clickme.php?id=10&stats=23d
### Please feel free to improve it if you like :)

### Also you can try (more power on data mining) [CustomStringParser](https://github.com/dotpot/Custom-String-Parser)