You've already forked system-design-primer
mirror of
https://github.com/donnemartin/system-design-primer.git
synced 2025-06-12 21:47:33 +02:00
Convert all .py files to be valid Python (#98)
This commit is contained in:
@ -2,33 +2,33 @@
|
||||
|
||||
class PagesDataStore(object):
|
||||
|
||||
def __init__(self, db);
|
||||
def __init__(self, db):
|
||||
self.db = db
|
||||
...
|
||||
pass
|
||||
|
||||
def add_link_to_crawl(self, url):
|
||||
"""Add the given link to `links_to_crawl`."""
|
||||
...
|
||||
pass
|
||||
|
||||
def remove_link_to_crawl(self, url):
|
||||
"""Remove the given link from `links_to_crawl`."""
|
||||
...
|
||||
pass
|
||||
|
||||
def reduce_priority_link_to_crawl(self, url)
|
||||
def reduce_priority_link_to_crawl(self, url):
|
||||
"""Reduce the priority of a link in `links_to_crawl` to avoid cycles."""
|
||||
...
|
||||
pass
|
||||
|
||||
def extract_max_priority_page(self):
|
||||
"""Return the highest priority link in `links_to_crawl`."""
|
||||
...
|
||||
pass
|
||||
|
||||
def insert_crawled_link(self, url, signature):
|
||||
"""Add the given link to `crawled_links`."""
|
||||
...
|
||||
pass
|
||||
|
||||
def crawled_similar(self, signature):
|
||||
"""Determine if we've already crawled a page matching the given signature"""
|
||||
...
|
||||
pass
|
||||
|
||||
|
||||
class Page(object):
|
||||
@ -41,7 +41,7 @@ class Page(object):
|
||||
|
||||
def create_signature(self):
|
||||
# Create signature based on url and contents
|
||||
...
|
||||
pass
|
||||
|
||||
|
||||
class Crawler(object):
|
||||
|
Reference in New Issue
Block a user