Changed download number extraction to also work with Google Docs extensions (and potentially others).
This commit is contained in:
parent
7d0a68a808
commit
cface0128c
|
@ -202,8 +202,9 @@ def parse_and_insert_overview(ext_id, date, datepath, con, verbose, indent):
|
||||||
categories = match.group(1).split(",") if match else None
|
categories = match.group(1).split(",") if match else None
|
||||||
|
|
||||||
# Extracts the number of downloads
|
# Extracts the number of downloads
|
||||||
match = re.search("""user_count.*?(\d+)""", contents)
|
match = re.search(
|
||||||
downloads = int(match.group(1)) if match else None
|
"""<meta itemprop="interactionCount" content="UserDownloads:((:?\d|,)+)"\s*/>""", contents)
|
||||||
|
downloads = int(match.group(1).replace(",",'')) if match else None
|
||||||
|
|
||||||
# Extracts the full extension description as it appears on the
|
# Extracts the full extension description as it appears on the
|
||||||
# overview page
|
# overview page
|
||||||
|
|
Loading…
Reference in New Issue