Skip to content

Commit

Permalink
Merge 8c3a92f into 83fa4ff
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Jun 11, 2019
2 parents 83fa4ff + 8c3a92f commit 582fe21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readabilipy/extractors/extract_date.py
Expand Up @@ -10,6 +10,8 @@ def extract_date(html):
xpaths = [
('//meta[@property="article:published_time"]/@content', 13),
('//meta[@property="og:updated_time"]/@content', 10),
('//meta[@property="og:article:published_time"]/@content', 10),
('//meta[@property="og:article:modified_time"]/@content', 10),
('//meta[@property="article:published"]/@content', 7),
('//meta[@itemprop="datePublished"]/@content', 3),
('//time/@datetime', 3),
Expand Down
2 changes: 2 additions & 0 deletions tests/test_date_functions.py
Expand Up @@ -10,6 +10,8 @@
("""<meta property="og:updated_time" content="2019-01-30T09:39:21-0500" />""", "2019-01-30T09:39:21"),
("""<meta itemprop="dateModified" content="2019-01-30T09:39:22-0500" />""", "2019-01-30T09:39:22"),
("""<meta itemprop="datePublished" content="2019-01-30T09:39:23-0500" />""", "2019-01-30T09:39:23"),
("""<meta property="og:article:published_time" content="2019-01-30T09:39:25-0500" />""", "2019-01-30T09:39:25"),
("""<meta property="og:article:modified_time" content="2019-01-30T09:39:26-0500" />""", "2019-01-30T09:39:26"),
("""<time datetime="2019-01-30T09:39:24-0500" />""", "2019-01-30T09:39:24"),
]

Expand Down

0 comments on commit 582fe21

Please sign in to comment.