Created
November 22, 2013 18:57
-
-
Save ajw0100/7605012 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [3]: sel.re(r'license_list\.cfm\?.*') | |
Out[3]: | |
[u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=2">2</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=3">3</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=4">4</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=5">5</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=6">6</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=7">7</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=8">8</a>\r', | |
u'license_list.cfm?genreID=1&cclicense=1&sort=1&page=2">Next ></a></strong>\r'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
re_allow = r'license_list\.cfm\?.*' | |
rules = ( | |
Rule(SgmlLinkExtractor(allow=re_allow), | |
callback='parse_list_page' | |
), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment