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
# https://stackoverflow.com/questions/3463930/how-to-round-the-minute-of-a-datetime-object-python/10854034#10854034 | |
def roundTime(dt=None, roundTo=60): | |
"""Round a datetime object to any time laps in seconds | |
dt : datetime.datetime object, default now. | |
roundTo : Closest number of seconds to round to, default 1 minute. | |
Author: Thierry Husson 2012 - Use it as you want but don't blame me. | |
""" | |
if dt == None : dt = datetime.datetime.now() | |
seconds = (dt - dt.min).seconds |
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
Tạo Http nhanh để download file | |
python -m SimpleHTTPServer | |
Tắt firewall | |
iptables -F | |
Mở lại firewall | |
iptables-restore < /etc/sysconfig/iptables |
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
dasfwfaf |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
from scrapy.contrib.linkextractors import LinkExtractor | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from manga_scrapy.items import VideoItem | |
#2sao.vn | |
class SaoVnSpider(CrawlSpider): | |
name = '2saovn' | |
allowed_domains = ['2sao.vn'] |
NewerOlder