Skip to content

Commit

Permalink
fix Adobe Flash
Browse files Browse the repository at this point in the history
  • Loading branch information
twkrol committed Nov 11, 2020
1 parent b8d7f52 commit 49dfec3
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 4 deletions.
14 changes: 10 additions & 4 deletions clients/flash.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
Module to grab actual editions & versions of Mozilla Firefox
"""
import logging
import copy
import urllib.request
import re
Expand All @@ -16,11 +17,16 @@ def getReleaseDate(edition):
# Looking for release date
url = "https://helpx.adobe.com/flash-player/release-note/fp_" + edition + "_air_" + edition + "_release_notes.html"
body = urllib.request.urlopen(url).read()
#print(url)
logging.debug(url)
soup = BeautifulSoup(body, "html5lib")
value = soup.find('div', {'class': 'text parbase section'}).find_next('div').find_next('p').find_next('p').find_next('strong').get_text()
result = datetime.strptime(value, '%B %d, %Y').date() # date format example: March 7, 2017
return result
tree = soup.find('div', {'class': 'text parbase section'})
for leaf in tree:
value = leaf.find_next('div').find_next('p').find_next('p').find_next('strong').get_text()
try:
result = datetime.strptime(value, '%B %d, %Y').date() # date format example: March 7, 2017
return result
except:
continue


def getEditions(template):
Expand Down
93 changes: 93 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
openapi: 3.0.0
info:
title: Vergrabber API
contact:
name: Tomasz Król
email: [email protected]
version: 1.1.0
servers:
- url: https://vergrabber.kingu.pl
paths:
/vergrabber.json:
get:
description: 'Returns all version definitions and signature information'
responses:
'200':
description: 'A tree of version definitions'
content:
application/json:
schema:
$ref: '#/components/schemas/Root'
components:
schemas:
Root:
type: object
properties:
signature:
$ref: '#/components/schemas/Signature'
server:
type: array
items:
type: object
$ref: '#/components/schemas/Application'
client:
type: array
items:
type: array
$ref: '#/components/schemas/Application'
latest:
type: array
items:
type: object
$ref: '#/components/schemas/Latest'
Signature:
type: object
properties:
app:
type: string
version:
type: string
author:
type: string
notice:
type: string
updated:
type: string
Version:
type: object
properties:
product:
type: string
edition:
type: string
version:
type: string
stable:
type: boolean
latest:
type: boolean
released:
type: string
ends:
type: string
lts:
type: boolean
Latest:
type: object
properties:
server:
type: array
$ref: '#/components/schemas/Application'
client:
type: array
$ref: '#/components/schemas/Application'
Application:
type: array
items:
type: object
$ref: '#/components/schemas/Edition'
Edition:
type: array
items:
type: object
$ref: '#/components/schemas/Version'

0 comments on commit 49dfec3

Please sign in to comment.