Created
November 1, 2017 20:40
-
-
Save ids1024/4cb366c2812772a3123ce4141e8adaa6 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
import sqlite3 | |
import urllib.parse | |
DOMAIN = 'google.com' | |
conn = sqlite3.connect("History") | |
c = conn.cursor() | |
c.execute("SELECT url FROM urls;") | |
urls = c.fetchall() | |
print(*set(i for i in (urllib.parse.urlparse(i[0]).netloc for i in urls) if i.endswith('.' + DOMAIN)), sep='\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment