facebook.py 文件源码

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

项目:valentina 作者: valentinavc 项目源码 文件源码
def find_id(self, contents=None):

        contents = self._load_url() if not contents else contents
        if not contents:
            return False

        pattern = r'(entity_id["\' ]{1,3}:["\' ]{1,3})([\d]+)'
        regex = re.compile(pattern, flags=re.VERBOSE)
        match = regex.search(contents)

        try:
            return match.group(2)
        except (IndexError, AttributeError):
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号