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
if (typeof Object.beget !== 'function') { | |
Object.create = function (o) { | |
var F = function () {}; | |
F.prototype = o; | |
return new F(); | |
}; | |
} | |
var another_stooge = Object.create(stooge); |
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
# Copyright (c) 2014-2016, racaljk. | |
# https://github.com/racaljk/hosts | |
# Last updated: 2016-08-23 | |
# This work is licensed under a CC BY-NC-SA 4.0 International License. | |
# https://creativecommons.org/licenses/by-nc-sa/4.0/ | |
# Localhost (DO NOT REMOVE) | |
127.0.0.1 localhost | |
255.255.255.255 broadcasthost |
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
import requests | |
from bs4 import BeautifulSoup | |
import codecs | |
DOWNLOAD_URL = 'http://book.douban.com/top250/' | |
def download_page(url): | |
data = requests.get(url).content | |
return data |