{"id":19026829,"url":"https://github.com/psolbach/metadoc","last_synced_at":"2025-08-21T05:33:20.739Z","repository":{"id":38433634,"uuid":"75629930","full_name":"psolbach/metadoc","owner":"psolbach","description":"Aviation grade news article metadata extraction","archived":false,"fork":false,"pushed_at":"2023-04-02T15:01:29.000Z","size":1117,"stargazers_count":36,"open_issues_count":5,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-23T07:47:33.177Z","etag":null,"topics":["extraction","metadata","news","nlp","perceptron"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psolbach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-05T13:58:59.000Z","updated_at":"2025-05-18T14:36:16.000Z","dependencies_parsed_at":"2022-08-18T23:50:22.112Z","dependency_job_id":"fdb3d91d-53b5-4c81-9fb1-80361264ac59","html_url":"https://github.com/psolbach/metadoc","commit_stats":null,"previous_names":["praise-internet/metadoc","psolbach/doxhund","fanmatics/metadoc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/psolbach/metadoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psolbach%2Fmetadoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psolbach%2Fmetadoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psolbach%2Fmetadoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psolbach%2Fmetadoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psolbach","download_url":"https://codeload.github.com/psolbach/metadoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psolbach%2Fmetadoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271430852,"owners_count":24758399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extraction","metadata","news","nlp","perceptron"],"created_at":"2024-11-08T20:50:51.839Z","updated_at":"2025-08-21T05:33:20.713Z","avatar_url":"https://github.com/psolbach.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔹 metadoc\n[![Coverage Status](https://coveralls.io/repos/github/psolbach/metadoc/badge.svg?branch=master)](https://coveralls.io/github/psolbach/metadoc?branch=master)\n\nMetadoc is a lightning-fast news article metadata extraction library. It does social media activity lookup, source authenticity rating, checksum creation, json-ld and metatag parsing as well as information extraction for named entities, pullquotes, fulltext and other useful things based off of arbitrary article URLs.\n\n## Example\n\nYou just throw it any news article URL, and Metadoc will yield.\n```python\nfrom metadoc import Metadoc\nurl = \"https://theintercept.com/2016/11/17/iphones-secretly-send-call-history-to-apple-security-firm-says\"\nmetadoc = Metadoc(url=url)\nres = metadoc.query()\n```\n=\u003e\n```python\n{\n  '__version__': '0.9.0',\n  'authors': ['Kim Zetter'],\n  'canonical_url': 'https://theintercept.com/2016/11/17/iphones-secretly-send-call-history-to-apple-security-firm-says/',\n  'domain': {\n    'credibility': {\n      'fake_confidence': '0.00',\n      'is_blacklisted': False\n    },\n    'date_registered': None,\n    'favicon': 'https://logo.clearbit.com/theintercept.com?size=200',\n    'name': 'theintercept.com'},\n    'entities': {\n      'keywords': [\n        'cellebrite',\n        'fbi',\n        'skype',\n        'intercept'\n        ...\n      ]\n    }\n  },\n  'image': 'https://theintercept.imgix.net/wp-uploads/sites/1/2016/11/GettyImages-578052668-s.jpg?auto=compress%2Cformat\u0026q=90\u0026fit=crop\u0026w=1200\u0026h=800',\n  'language': 'en',\n  'modified_date': None,\n  'published_date': '2016-11-17T11:00:36+00:00',\n  'scraped_date': '2018-07-10T12:13:46+00:00',\n  'social': [{\n    'metrics': [{\n      'count': 7340, 'label': 'sharecount'\n    }],\n    'provider': 'facebook'\n  }],\n  'text': {\n    'contenthash': '940a62c70db255b4aec378529ae7a2c8',\n    'fulltext': 'a guardian of user privacy this year after fighting FBI\n      demands to help crack into San Bernardino shooter Syed ...',\n    'reading_time': 439,\n    'summary': 'Your call logs get sent to Apple’s servers whenever iCloud is on — something Apple does not disclose.'\n  },\n  'title': 'iPhones Secretly Send Call\\xa0History to Apple, Security Firm Says',\n  'url': 'https://theintercept.com/2016/11/17/iphones-secretly-send-call-history-to-apple-security-firm-says'\n}\n```\n\n## Trustworthiness Check\nMetadoc does a basic background check on article sources. This means a simple blacklist-lookup via `whois` data on the domain. Blacklists taken into account include the controversial [PropOrNot](http://www.propornot.com/p/the-list.html). Thus, only if a domain is found on every blacklist do we spit out a `fake_confidence` of 1. The resulting metadata should be taken with a grain of salt.\n\n## Part-of-speech tagging\nFor speed and simplicity, we decided against `nltk` and instead rely on the Averaged Perceptron as imagined by Matthew Honnibal [@explosion](https://github.com/explosion). The pip install comes pre-trained with a [CoNLL 2000](http://www.cnts.ua.ac.be/conll2000/) training set which works reasonably well to detect proper nouns. Since training is non-deterministic, unwanted stopwords might slip through. If you want to try out other datasets, simply replace `metadoc/extract/data/training_set.txt` with your own and run `metadoc.extract.pos.do_train`.\n\n## Install\nRequires python 3.5.\n\n#### Using pip\n```shell\npip install metadoc\n```\n\n## Develop\n\n#### Mac OS\n```shell\nbrew install python3 libxml2 libxslt libtiff libjpeg webp little-cms2\n```\n#### Ubuntu\n```shell\napt-get install -y python3 libxml2-dev libxslt-dev libtiff-dev libjpeg-dev webp whois\n```\n#### Fedora/Redhat\n```shell\ndnf install libxml2-devel libxslt-devel libtiff-devel libjpeg-devel libjpeg-turbo-devel libwebp whois\n```\n#### Then\n```shell\npip3 install -r requirements-dev.txt\npython serve.py =\u003e serving @ 6060\n```\n\n## Test\n```shell\npy.test -v tests\n```\nIf you happen to run into an error with OSX 10.11 concerning a lazy bound library in PIL,   \njust remove `/PIL/.dylibs/liblzma.5.dylib`.\n\n## Todo\n* Page concatenation is needed in order to properly calculate wordcount and reading time.\n* Authenticity heuristic with sharecount deviance detection (requires state).\n* ~~Perf: Worst offender is nltk's pos tagger. Roll own w/ Average Perceptron.~~\n* ~~Newspaper's summarize produces pullquotes, fulltext takes a while. Move to libextract?~~\n\n## Contributors\n[Martin Borho](https://github.com/mborho)   \n[Paul Solbach](https://github.com/___paul)   \n\n---\n\nMeteadoc is a software product of FanMatics, Hamburg.   \nMetadoc stems from a pedigree of nice libraries like [goose3](https://github.com/goose3/goose3/tree/master/goose3), [langdetect](https://github.com/Mimino666/langdetect) and [nltk](https://github.com/nltk/nltk).   \nMetadoc leans on [this](https://github.com/hankcs/AveragedPerceptronPython) perceptron implementation inspired by Matthew Honnibal.    \nMetadoc is a work-in-progress.   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsolbach%2Fmetadoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsolbach%2Fmetadoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsolbach%2Fmetadoc/lists"}