本文整理汇总了Python中sunpy.util.scraper.Scraper._URL_followsPattern方法的典型用法代码示例。如果您正苦于以下问题:Python Scraper._URL_followsPattern方法的具体用法?Python Scraper._URL_followsPattern怎么用?Python Scraper._URL_followsPattern使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sunpy.util.scraper.Scraper
的用法示例。
在下文中一共展示了Scraper._URL_followsPattern方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testURL_patternMilliseconds
# 需要导入模块: from sunpy.util.scraper import Scraper [as 别名]
# 或者: from sunpy.util.scraper.Scraper import _URL_followsPattern [as 别名]
def testURL_patternMilliseconds():
s = Scraper('fd_%Y%m%d_%H%M%S_%e.fts')
# NOTE: Seems that if below fails randomly - not understood why
# with `== True` fails a bit less...
assert s._URL_followsPattern('fd_20130410_231211_119.fts')
assert not s._URL_followsPattern('fd_20130410_231211.fts.gz')
assert not s._URL_followsPattern('fd_20130410_ar_231211.fts.gz')
示例2: testURL_pattern
# 需要导入模块: from sunpy.util.scraper import Scraper [as 别名]
# 或者: from sunpy.util.scraper.Scraper import _URL_followsPattern [as 别名]
def testURL_pattern():
s = Scraper('fd_%Y%m%d_%H%M%S.fts')
assert s._URL_followsPattern('fd_20130410_231211.fts')
assert not s._URL_followsPattern('fd_20130410_231211.fts.gz')
assert not s._URL_followsPattern('fd_20130410_ar_231211.fts.gz')
示例3: testURL_patternMillisecondsGeneric
# 需要导入模块: from sunpy.util.scraper import Scraper [as 别名]
# 或者: from sunpy.util.scraper.Scraper import _URL_followsPattern [as 别名]
def testURL_patternMillisecondsGeneric():
s = Scraper('fd_%Y%m%d_%H%M%S_%e.fts')
assert s._URL_followsPattern('fd_20130410_231211_119.fts')
assert not s._URL_followsPattern('fd_20130410_231211.fts.gz')
assert not s._URL_followsPattern('fd_20130410_ar_231211.fts.gz')