assetstore.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:unity 作者: awolfly9 项目源码 文件源码
def __init__(self, *a, **kwargs):
        super(AssetStoreSpider, self).__init__(*a, **kwargs)

        # ?????????
        self.dir_plugins = 'Plugins/'
        self.dir_all = self.dir_plugins + 'all'

        utils.make_dir(self.dir_plugins)
        utils.make_dir(self.dir_all)

        # ?????????
        self.plugin_list = []

        self.sql = SqlHelper()
        self.table_name = config.assetstore_table_name

        self.priority_adjust = 2

        # unity ???
        self.unity_version = ''

        # ?? header
        self.headers = {
            'Accept': '*/*',
            'Accept-Encoding': 'gzip, deflate, br',
            'Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3',
            'Connection': 'keep-alive',
            'Host': 'www.assetstore.unity3d.com',
            'Referer': 'https://www.assetstore.unity3d.com/en/',
            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0',
            'X-Kharma-Version': self.unity_version,
            'X-Requested-With': 'UnityAssetStore',
            'X-Unity-Session': '26c4202eb475d02864b40827dfff11a14657aa41',
        }

        self.init()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号