(cls, app, src, media_id=None)
从src迁移图文到app
从src迁移图文到app
从src迁移图文到app
def migrate(cls, app, src, media_id=None):
        """
        从src迁移图文到app
        """
        if media_id:
            news = src.download_material(media_id)
            return cls._migrate_news(app, src, news)
        else:
            data = src.get_materials(Material.Type.NEWS)
            return [cls._migrate_news(app, src, news) for news in data]
def migrate ( cls , app , src , media_id = None ) : if media_id : news = src . download_material ( media_id ) return cls . _migrate_news ( app , src , news ) else : data = src . get_materials ( Material . Type . NEWS ) return [ cls . _migrate_news ( app , src , news ) for news in data ]