Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import requests
- from pyquery import PyQuery as pq
- base_url = "https://builtwith.com/"
- if __name__ == "__main__":
- if len(sys.argv) < 2:
- print("usage: python buildwith.py <url>")
- sys.exit(0)
- full = False if len(sys.argv) < 3 else True
- p = pq(requests.get(base_url + sys.argv[1]).text)
- for c in p(".span8").children():
- if "title" in c.attrib["class"]:
- print '\n', c.getchildren()[0].getchildren()[0].getchildren()[0].text
- elif "tech" in c.attrib["class"]:
- print '-', c.getchildren()[0].getchildren()[1].text
- if full:
- print "\t", c.getchildren()[2].text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement