-
Notifications
You must be signed in to change notification settings - Fork 19
snippets
mtill edited this page Aug 31, 2017
·
8 revisions
This site collects xpath/regex snippets for some websites. You might add them to your config.py file.
Please feel free to contribute and to add your own snippet...!
* track commits of a SVN repository:
'name': 'SVN_example',
'uri': 'cmd://svn log https://svn.my-example-repositry-server.de/svn/Repo -v',
'contentregex': '-{72,72}\n(.*?)(?=-{72,72})'
* www.solar-log.com (SolarLog 1000)
'name': 'SolarLog',
'uri': 'http://www.solar-log.com/typo3conf/ext/getfirmware/getfirmware.php?s=3&logid=7&wrid=999&lng=DE',
'contentxpath': '//body/*'
* 'name': 'rockbox',
'uri': 'http://www.rockbox.org/download/',
'contentxpath': '//h1',
* willuhn.de/products/hibiscus
'name': 'jameica',
'uri': 'http://willuhn.de/products/hibiscus/',
'contentxpath': '//*[@id=\'content\']/div[contains(concat(\' \', normalize-space(@class), \' \'), \'news\')]',
'encoding': 'iso-8859-1'},
* calibre-ebook.com
'name': 'calibre',
'uri': 'http://calibre-ebook.com/download_linux',
'contentxpath': '//*[@id=\'content\']/p',
'contentregex': 'The latest release of calibre is .*',
* Acer S3 Firmware
'name': 'LaptopFirmware',
'uri': 'http://www.acer.com/wjws/ws/gdp/files/en/US/-/latest/bios/4088?_jsonp=FilesDataServiceCallBack_12&t=1368263488751',
'contentregex': 'Version\"\:\d*\.\d*',
* openwrt.org
'name': 'OpenWrt',
'uri': 'https://openwrt.org/index.php',
'contentxpath': '//*[contains(concat(\' \', normalize-space(@class), \' \'), \' content \')]',
* Kindle Touch Firmware
'name': 'kindleFirmware',
'uri': 'http://www.amazon.com/gp/help/customer/display.html/ref=hp_left_sib?ie=UTF8&nodeId=200790650',
'contentxpath': '//*[@id=\'GUID-3038BDB9-2F50-433B-815E-9160D1C8572E__GUID-5D35F37A-8103-4C6E-B1AB-2FDDE21A8BE0\']',
* www.edimax.com repeater
'name': 'edimax',
'uri': 'http://www.edimax.com/en/support_detail.php?pd_id=404&pl1_id=1',
'contentxpath': '//*[@id=\'container\']',
* Munich Highlights
'name': 'MUC_Highlights',
'uri': 'http://www.muenchen.de/veranstaltungen/events/highlightsdesjahres.html',
'contentxpath': '//div[@id=\'main\']/div[@class=\'block\']',
* Munich satirical shows
'name': 'MUC_Kabarett',
'uri': 'http://www.muenchen.de/veranstaltungen/events/kabarett.html',
'contentxpath': '//*[contains(concat(\' \', normalize-space(@class), \' \'), \' elitem \')]',
* Munich theatre
'name': 'MUC_Theater',
'uri': 'http://www.muenchen.de/veranstaltungen/events/theater.html',
'contentxpath': '//*[contains(concat(\' \', normalize-space(@class), \' \'), \' elitem \')]',
* www.hetzner.de
'name': 'Hetzner',
'uri': 'http://www.hetzner.de/hosting/news/news-home',
'titlexpath': "//*[@id='content-noright']/h4[position()>1]",
'contentxpath': "//*[@id='content-noright']/p[position()>1]"
# GitHub, new software release
{'name': 'GitHub, new release - projectname',
'uri': 'https://github.com/username/project/tags.atom',
'contentxpath': '//entry/title',
'encoding': 'utf-8'},
# GitHub, new commits
{'name': 'GitHub, new commits - projectname',
'uri': 'https://github.com/username/project/commits/master.atom',
'contentxpath': '//entry/id',
'encoding': 'utf-8'},
# SourceForge, new software release
{'name': 'SourceForge, new release - projectname',
'uri': 'https://sourceforge.net/projects/projectname/',
'contentxpath': '//section[@id=\'download_button\']//small',
'encoding': 'utf-8'},
# Mercurial, new software release
{'name': 'Mercurial, new release - projectname',
'uri': 'http://url/projectname/tags',
'contentxpath': '//tr[@class=\'tagEntry\']',
'contentregex': '/projectname/rev/release-*.*.*',
'encoding': 'utf-8'},
# Mercurial, new commits
{'name': 'Mercurial, new commits - projectname',
'uri': 'http://url/repos/projectname/rev/tip',
'contentxpath': '//h3',
'encoding': 'utf-8'},
# Bazaar - Launchpad, new revision
{'name': 'Bazaar Launchpad, new revision - projectname',
'uri': 'https://bazaar.launchpad.net/~projectname/projectname/trunk/files',
'contentxpath': '//span[@class=\'breadcrumb\']',
'encoding': 'utf-8'},