Created
February 24, 2017 11:55
-
-
Save jul/7056d4535da42103407ba2424e47d507 to your computer and use it in GitHub Desktop.
Measure how much sites saying they have angular, might have
This file contains 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
"""disclaimer may trigger false negative/positive | |
no measuring tools are perfect | |
""" | |
from pyquery import PyQuery as P | |
doc= P("https://www.madewithangular.com/") | |
doc.make_links_absolute() | |
import re | |
def one_zero(itera): | |
try: | |
itera.next() | |
return 1 | |
except StopIteration: | |
return 0 | |
has_angular = 0 | |
total= 0.0 | |
failed=0 | |
import re | |
search = re.compile("(ng-app|angular)").finditer | |
for ahref in doc("a"): | |
href = P(ahref).attr.href | |
if "sites" in href: | |
second_order_doc=P(href) | |
second_order_doc.make_links_absolute() | |
for bhref in second_order_doc.find(".site > a"): | |
total += 1 | |
aarg=0 | |
this_has_angular=0 | |
try: | |
point_to= P(bhref).attr.href | |
this_has_angular = one_zero(search(P(point_to).html())) | |
has_angular+= this_has_angular | |
except: | |
failed+=1 | |
aarg=1 | |
print "%32s %s %f" % ( point_to, aarg and "FF" or (this_has_angular and "OK" or "KO"), has_angular * 100 / total ) | |
print total | |
# 85.0 | |
print failed | |
# 11 | |
print has_angular | |
37 | |
""" | |
https://vendorportal.newegg.com/ KO 0.000000 | |
https://dev.wix.com/ OK 50.000000 | |
http://www.staples.com/ OK 66.666667 | |
https://www.google.com/about/careers/applications/#/ KO 50.000000 | |
https://assistant.google.com/ OK 60.000000 | |
http://www.savethedate.foo/ KO 50.000000 | |
https://environment.google/ OK 57.142857 | |
https://popup.withgoogle.com/nyc OK 62.500000 | |
https://www.openproject.org/ FF 55.555556 | |
https://support.microsoft.com/en-us OK 60.000000 | |
https://www.topcoder.com/ FF 54.545455 | |
https://mysolarcity.com/ FF 50.000000 | |
http://www.weather.com/ OK 53.846154 | |
http://www.xprize.org/prizes/future-prizes OK 57.142857 | |
https://www.zoosk.com/ OK 60.000000 | |
http://www.livejournal.com/ OK 62.500000 | |
https://www.generosity.com/ FF 58.823529 | |
https://www.coupondunia.in/ KO 55.555556 | |
http://www.eddiebauer.com/ KO 52.631579 | |
http://www.landsend.com/ OK 55.000000 | |
http://www.homedepot.com/l/Kifer-Rd/CA/Sunnyvale/94086/640 KO 52.380952 | |
http://psalter.library.uu.nl/ OK 54.545455 | |
http://www.britannica.com/ OK 56.521739 | |
https://www.wolframalpha.com/ KO 54.166667 | |
https://editionsatplay.withgoogle.com/#/ OK 56.000000 | |
https://www.thinkorswim.com/t/innovation.html OK 57.692308 | |
http://www.nasdaq.com/ KO 55.555556 | |
https://www.progressive.com/experience/home-3/ KO 53.571429 | |
https://ttlc.intuit.com/turbotax KO 51.724138 | |
https://www.tesla.com/findus OK 53.333333 | |
http://www.kia.com/us/en/home KO 51.612903 | |
http://cotrip.org/snowplow.htm#/snowplow OK 53.125000 | |
https://anfrage.renault.de/informiert-bleiben/megane FF 51.515152 | |
http://www.cvs.com/ KO 50.000000 | |
https://www.freeletics.com/en KO 48.571429 | |
https://www.healthcare.gov/see-plans OK 50.000000 | |
https://www.underarmour.com/en-us/checkout KO 48.648649 | |
https://otherlab.com/ OK 50.000000 | |
https://docs.api.ai/ KO 48.717949 | |
https://prezi.com/support/ OK 50.000000 | |
https://dzone.com/ OK 51.219512 | |
http://www.nbcolympics.com/ OK 52.380952 | |
http://www.foxsports.com/nfl/story/peyton-manning-denver-broncos-win-super-bowl-50-carolina-panthers-020716 KO 51.162791 | |
http://global.nba.com/ OK 52.272727 | |
http://www.tsn.ca/ OK 53.333333 | |
https://gopro.com/ KO 52.173913 | |
https://recap360.autodesk.com/ KO 51.063830 | |
http://www.gettyimages.com/ OK 52.083333 | |
http://www.istockphoto.com OK 53.061224 | |
http://www.hitbox.tv/ KO 52.000000 | |
http://www.lego.com/en-us/ KO 50.980392 | |
http://www.paranormalstudieslab.com/#/ OK 51.923077 | |
http://oscar.go.com/ KO 50.943396 | |
https://www.hellofresh.com/tasty/ KO 50.000000 | |
http://www.einsteinbros.com/ KO 49.090909 | |
http://grocery.walmart.com/usd-estore/m/home/anonymouslanding.jsp KO 48.214286 | |
https://www.ipsy.com/ OK 49.122807 | |
http://extradiscount.in/ KO 48.275862 | |
https://www.landinglion.com/ KO 47.457627 | |
https://www.365daysofmusic.com/ KO 46.666667 | |
http://papergames.io/#/en OK 47.540984 | |
https://mail.protonmail.com/ KO 46.774194 | |
https://www.virginmobileusa.com OK 47.619048 | |
http://www.virginmobile.ca/en/home/index.html OK 48.437500 | |
http://www.virginmobile.fr/ FF 47.692308 | |
https://www.dataquest.io/ FF 46.969697 | |
https://www.udemy.com/courses/search/?q=angular OK 47.761194 | |
https://dashboard.kodable.com KO 47.058824 | |
https://novoed.com/ KO 46.376812 | |
https://splice.com/ FF 45.714286 | |
https://flat.io/ KO 45.070423 | |
http://www.metrolyrics.com/ OK 45.833333 | |
http://genius.com/ FF 45.205479 | |
http://www.nycgo.com/restaurant-week KO 44.594595 | |
https://www.priceline.com KO 44.000000 | |
https://www.virginholidays.co.uk/ OK 44.736842 | |
https://www.aerlingus.com/html/en-IE/home.html KO 44.155844 | |
http://one.npr.org/ KO 43.589744 | |
http://unb.com.bd OK 44.303797 | |
http://www.caranddriver.com/ KO 43.750000 | |
http://www.psmag.com/ FF 43.209877 | |
https://sonypicturesstore.com/bdgp OK 43.902439 | |
http://gfycat.com/ FF 43.373494 | |
http://store.dji.com/ KO 42.857143 | |
http://video.mercedes-benz.co.uk/#!/ OK 43.529412 | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment