Skip to content

Instantly share code, notes, and snippets.

@DecKen
Created August 1, 2014 09:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DecKen/28dea5a2553190223ca6 to your computer and use it in GitHub Desktop.
Save DecKen/28dea5a2553190223ca6 to your computer and use it in GitHub Desktop.
crawl
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from urlparse import urljoin
from pyquery import PyQuery as pq
url = "http://www.szeros-wedding.com/html/service/804.html"
area = pq(url)('.pic img')
urllist = []
area.each(lambda index, element: urllist.append(urljoin(url, pq(element).attr('src'))))
for url in urllist:
print url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment