Beispiel #1
0
    def __init__(self, url):
        #https://zhuanlan.zhihu.com/p/20825292
        self.originalurl = url
        number = re.findall(r"(\d+)", url)[0]
        self.url = "http://zhuanlan.zhihu.com/api/posts/" + str(number)

        self.headers = headers.copy()
        self.headers["Host"] = "zhuanlan.zhihu.com"
Beispiel #2
0
    def __init__(self, url):
        #https://zhuanlan.zhihu.com/p/20825292
        self.originalurl = url
        number = re.findall(r"(\d+)", url)[0]
        self.url = "http://zhuanlan.zhihu.com/api/posts/" + str(number)

        self.headers = headers.copy()
        self.headers["Host"] = "zhuanlan.zhihu.com"
Beispiel #3
0
 def __init__(self, item, _xsrf, summary=None):
     self.item = item
     self._xsrf = _xsrf
     self.headers = headers.copy()
     self.summary = summary
Beispiel #4
0
 def __init__(self, url):
     self.url = url
     self.headers = headers.copy()
Beispiel #5
0
 def __init__(self, url):
     self.url = url
     self.headers = headers.copy()
     self.headers["Referer"] = self.url
Beispiel #6
0
 def __init__(self, url, _xsrf=None):
     self.url = url
     self.headers = headers.copy()
     self._xsrf = _xsrf
Beispiel #7
0
 def __init__(self, url, _xsrf=None):
     self.url = url
     self.headers = headers.copy()
     self._xsrf = _xsrf