Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add phpspot.org custom parser #369

Merged
merged 2 commits into from
Apr 12, 2019

Conversation

kik0220
Copy link
Contributor

@kik0220 kik0220 commented Apr 9, 2019

phpspot.org custom parser

@postlight-org
Copy link
Collaborator

🤖 Automated Parsing Preview 🤖

Commit: feat: add phpspot.org custom parser

Screenshot of fixture (this embed should work after repo is public)

Original Article | HTML Fixture | Parsed Content Preview

Parsed JSON
{
  "title": "マインドマップ風のツリーを描画できる「Treeviz」",
  "content": "<div><div class=\"entrybody\">\n<p><a href=\"https://codepen.io/pierrecapo/full/MPbBdv\">Treeviz</a><br>\n<br>\n&#x30DE;&#x30A4;&#x30F3;&#x30C9;&#x30DE;&#x30C3;&#x30D7;&#x98A8;&#x306E;&#x30C4;&#x30EA;&#x30FC;&#x3092;&#x63CF;&#x753B;&#x3067;&#x304D;&#x308B;&#x300C;Treeviz&#x300D;<br>\n&#x6B21;&#x306E;&#x3088;&#x3046;&#x306A;&#x56F3;&#x5F62;&#x3092;&#x63CF;&#x753B;&#x3067;&#x304D;&#x308B;codepen&#x3067;&#x306E;&#x30B5;&#x30F3;&#x30D7;&#x30EB;&#x3067;&#x3059;<br>\n<img src=\"http://phpspot.net/php/webimager/admin3/data/4a79a2cfdd0dd3624fd5590d4ea50c17.png\"><br>\n<br>\n&#x95A2;&#x9023;&#x30A8;&#x30F3;&#x30C8;&#x30EA;</p>\n<ul>\n\t<li><a href=\"http://phpspot.org/blog/archives/2011/11/arborjs.html\">&#x8907;&#x6570;&#x8981;&#x7D20;&#x306E;&#x95A2;&#x9023;&#x3092;&#x30D3;&#x30B8;&#x30E5;&#x30A2;&#x30E9;&#x30A4;&#x30BA;&#x3067;&#x304D;&#x308B;&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;&#x300C;arbor.js&#x300D;</a></li>\n\t<li><a href=\"http://phpspot.org/blog/archives/2008/09/post_243.html\">&#x30C7;&#x30FC;&#x30BF;&#x3092;&#x8996;&#x899A;&#x7684;&#x306B;&#x5206;&#x304B;&#x308A;&#x3084;&#x3059;&#x304F;&#x30D3;&#x30B8;&#x30E5;&#x30A2;&#x30E9;&#x30A4;&#x30BA;&#x3059;&#x308B;&#x305F;&#x3081;&#x306E;&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;&#x96C6;</a></li>\n</ul>\n\n\n</div></div>",
  "author": null,
  "date_published": null,
  "lead_image_url": null,
  "dek": null,
  "next_page_url": null,
  "url": "http://phpspot.org/blog/archives/2019/04/treeviz.html",
  "domain": "phpspot.org",
  "word_count": 4,
  "direction": "ltr",
  "total_pages": 1,
  "rendered_pages": 1
}

null fields

  • author

  • date_published

  • lead_image_url

  • dek

  • next_page_url

✅ All tests passed

@postlight-org
Copy link
Collaborator

🤖 Automated Parsing Preview 🤖

Commit: feat: add phpspot.org custom parser

Screenshot of fixture (this embed should work after repo is public)

Original Article | HTML Fixture | Parsed Content Preview

Parsed JSON
{
  "title": "マインドマップ風のツリーを描画できる「Treeviz」",
  "content": "<div><div class=\"entrybody\">\n<p><a href=\"https://codepen.io/pierrecapo/full/MPbBdv\">Treeviz</a><br>\n<br>\n&#x30DE;&#x30A4;&#x30F3;&#x30C9;&#x30DE;&#x30C3;&#x30D7;&#x98A8;&#x306E;&#x30C4;&#x30EA;&#x30FC;&#x3092;&#x63CF;&#x753B;&#x3067;&#x304D;&#x308B;&#x300C;Treeviz&#x300D;<br>\n&#x6B21;&#x306E;&#x3088;&#x3046;&#x306A;&#x56F3;&#x5F62;&#x3092;&#x63CF;&#x753B;&#x3067;&#x304D;&#x308B;codepen&#x3067;&#x306E;&#x30B5;&#x30F3;&#x30D7;&#x30EB;&#x3067;&#x3059;<br>\n<img src=\"http://phpspot.net/php/webimager/admin3/data/4a79a2cfdd0dd3624fd5590d4ea50c17.png\"><br>\n<br>\n&#x95A2;&#x9023;&#x30A8;&#x30F3;&#x30C8;&#x30EA;</p>\n<ul>\n\t<li><a href=\"http://phpspot.org/blog/archives/2011/11/arborjs.html\">&#x8907;&#x6570;&#x8981;&#x7D20;&#x306E;&#x95A2;&#x9023;&#x3092;&#x30D3;&#x30B8;&#x30E5;&#x30A2;&#x30E9;&#x30A4;&#x30BA;&#x3067;&#x304D;&#x308B;&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;&#x300C;arbor.js&#x300D;</a></li>\n\t<li><a href=\"http://phpspot.org/blog/archives/2008/09/post_243.html\">&#x30C7;&#x30FC;&#x30BF;&#x3092;&#x8996;&#x899A;&#x7684;&#x306B;&#x5206;&#x304B;&#x308A;&#x3084;&#x3059;&#x304F;&#x30D3;&#x30B8;&#x30E5;&#x30A2;&#x30E9;&#x30A4;&#x30BA;&#x3059;&#x308B;&#x305F;&#x3081;&#x306E;&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;&#x96C6;</a></li>\n</ul>\n\n\n</div></div>",
  "author": null,
  "date_published": null,
  "lead_image_url": null,
  "dek": null,
  "next_page_url": null,
  "url": "http://phpspot.org/blog/archives/2019/04/treeviz.html",
  "domain": "phpspot.org",
  "word_count": 4,
  "direction": "ltr",
  "total_pages": 1,
  "rendered_pages": 1
}

null fields

  • author

  • date_published

  • lead_image_url

  • dek

  • next_page_url

✅ All tests passed

@postlight-org
Copy link
Collaborator

🤖 Automated Parsing Preview 🤖

Commit: fix: date_published selector

Screenshot of fixture (this embed should work after repo is public)

Original Article | HTML Fixture | Parsed Content Preview

Parsed JSON
{
  "title": "マインドマップ風のツリーを描画できる「Treeviz」",
  "content": "<div><div class=\"entrybody\">\n<p><a href=\"https://codepen.io/pierrecapo/full/MPbBdv\">Treeviz</a><br>\n<br>\n&#x30DE;&#x30A4;&#x30F3;&#x30C9;&#x30DE;&#x30C3;&#x30D7;&#x98A8;&#x306E;&#x30C4;&#x30EA;&#x30FC;&#x3092;&#x63CF;&#x753B;&#x3067;&#x304D;&#x308B;&#x300C;Treeviz&#x300D;<br>\n&#x6B21;&#x306E;&#x3088;&#x3046;&#x306A;&#x56F3;&#x5F62;&#x3092;&#x63CF;&#x753B;&#x3067;&#x304D;&#x308B;codepen&#x3067;&#x306E;&#x30B5;&#x30F3;&#x30D7;&#x30EB;&#x3067;&#x3059;<br>\n<img src=\"http://phpspot.net/php/webimager/admin3/data/4a79a2cfdd0dd3624fd5590d4ea50c17.png\"><br>\n<br>\n&#x95A2;&#x9023;&#x30A8;&#x30F3;&#x30C8;&#x30EA;</p>\n<ul>\n\t<li><a href=\"http://phpspot.org/blog/archives/2011/11/arborjs.html\">&#x8907;&#x6570;&#x8981;&#x7D20;&#x306E;&#x95A2;&#x9023;&#x3092;&#x30D3;&#x30B8;&#x30E5;&#x30A2;&#x30E9;&#x30A4;&#x30BA;&#x3067;&#x304D;&#x308B;&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;&#x300C;arbor.js&#x300D;</a></li>\n\t<li><a href=\"http://phpspot.org/blog/archives/2008/09/post_243.html\">&#x30C7;&#x30FC;&#x30BF;&#x3092;&#x8996;&#x899A;&#x7684;&#x306B;&#x5206;&#x304B;&#x308A;&#x3084;&#x3059;&#x304F;&#x30D3;&#x30B8;&#x30E5;&#x30A2;&#x30E9;&#x30A4;&#x30BA;&#x3059;&#x308B;&#x305F;&#x3081;&#x306E;&#x30E9;&#x30A4;&#x30D6;&#x30E9;&#x30EA;&#x96C6;</a></li>\n</ul>\n\n\n</div></div>",
  "author": null,
  "date_published": "2019-04-03T15:00:00.000Z",
  "lead_image_url": null,
  "dek": null,
  "next_page_url": null,
  "url": "http://phpspot.org/blog/archives/2019/04/treeviz.html",
  "domain": "phpspot.org",
  "word_count": 4,
  "direction": "ltr",
  "total_pages": 1,
  "rendered_pages": 1
}

null fields

  • author

  • lead_image_url

  • dek

  • next_page_url

✅ All tests passed

@toufic-m toufic-m merged commit ce5cd2d into postlight:master Apr 12, 2019
@kik0220 kik0220 deleted the feat-phpspot-org-extractor branch April 12, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants