{"action":"created","issue":{"url":"https://api.github.com/repos/IUNetSci/hoaxy-backend/issues/1","repository_url":"https://api.github.com/repos/IUNetSci/hoaxy-backend","labels_url":"https://api.github.com/repos/IUNetSci/hoaxy-backend/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/IUNetSci/hoaxy-backend/issues/1/comments","events_url":"https://api.github.com/repos/IUNetSci/hoaxy-backend/issues/1/events","html_url":"https://github.com/IUNetSci/hoaxy-backend/issues/1","id":240389267,"number":1,"title":"hoaxy init on afp.com fails","user":{"login":"fhamborg","id":18700166,"avatar_url":"https://avatars1.githubusercontent.com/u/18700166?v=3","gravatar_id":"","url":"https://api.github.com/users/fhamborg","html_url":"https://github.com/fhamborg","followers_url":"https://api.github.com/users/fhamborg/followers","following_url":"https://api.github.com/users/fhamborg/following{/other_user}","gists_url":"https://api.github.com/users/fhamborg/gists{/gist_id}","starred_url":"https://api.github.com/users/fhamborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fhamborg/subscriptions","organizations_url":"https://api.github.com/users/fhamborg/orgs","repos_url":"https://api.github.com/users/fhamborg/repos","events_url":"https://api.github.com/users/fhamborg/events{/privacy}","received_events_url":"https://api.github.com/users/fhamborg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-04T11:10:11Z","updated_at":"2017-07-06T22:03:23Z","closed_at":null,"body":"When running `hoaxy init` with a `domains_factchecking.txt` that contains the following line \r\n```\r\nwww.afp.com\r\n```\r\nI get the following error\r\n```\r\n(hoaxy) hoaxyuser@hoaxydeback:/root$ hoaxy init\r\n2017-07-04 11:06:34,155 - hoaxy(init) - INFO: Creating database tables:\r\n2017-07-04 11:06:34,155 - hoaxy(init) - WARNING: Ignore existed tables\r\n2017-07-04 11:06:34,182 - hoaxy(init) - INFO: Inserting platforms if not exist\r\n2017-07-04 11:06:34,215 - hoaxy(init) - INFO: Trying to load site data:\r\n2017-07-04 11:06:34,215 - hoaxy(init) - INFO: Claim domains /home/hoaxyuser/.hoaxy/domains_claim.txt found\r\n2017-07-04 11:06:34,215 - hoaxy(init) - INFO: Sending HTTP requests to infer base URLs ...\r\n2017-07-04 11:06:42,714 - hoaxy(init) - INFO: Fact checking domains /home/hoaxyuser/.hoaxy/domains_factchecking.txt found\r\n2017-07-04 11:06:42,714 - hoaxy(init) - INFO: Sending HTTP requests to infer base URLs ...\r\n2017-07-04 11:06:44,110 - hoaxy(init) - ERROR: HTTPConnectionPool(host='afp.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa71187c490>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))\r\n2017-07-04 11:06:44,114 - hoaxy(init) - ERROR: HTTPSConnectionPool(host='afp.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa711897c50>: Failed to establish a new connection: [Errno -5] No address associated with hostname',))\r\n2017-07-04 11:06:44,210 - hoaxy(init) - WARNING: line 18 'www.afp.com', domain inactive!\r\n2017-07-04 11:06:44,210 - hoaxy(init) - ERROR: Please fix the warnings or errors above! Edit domains, or use --ignore-redirected to handle redirected domains', or Use --ignore-inactive or --force-inactive  to handle inactive domains\r\n```\r\n\r\nHowever, when visiting the domain in my browser, everything seems to work fine.\r\n\r\nA second issue is that afp.com is actually publishing in English, but we would like to access the German version that is available at afp.com/de. However, hoaxy only accepts domains and not URLs. Any workaround for that?"},"comment":{"url":"https://api.github.com/repos/IUNetSci/hoaxy-backend/issues/comments/313531878","html_url":"https://github.com/IUNetSci/hoaxy-backend/issues/1#issuecomment-313531878","issue_url":"https://api.github.com/repos/IUNetSci/hoaxy-backend/issues/1","id":313531878,"user":{"login":"shaochengcheng","id":11503771,"avatar_url":"https://avatars1.githubusercontent.com/u/11503771?v=3","gravatar_id":"","url":"https://api.github.com/users/shaochengcheng","html_url":"https://github.com/shaochengcheng","followers_url":"https://api.github.com/users/shaochengcheng/followers","following_url":"https://api.github.com/users/shaochengcheng/following{/other_user}","gists_url":"https://api.github.com/users/shaochengcheng/gists{/gist_id}","starred_url":"https://api.github.com/users/shaochengcheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaochengcheng/subscriptions","organizations_url":"https://api.github.com/users/shaochengcheng/orgs","repos_url":"https://api.github.com/users/shaochengcheng/repos","events_url":"https://api.github.com/users/shaochengcheng/events{/privacy}","received_events_url":"https://api.github.com/users/shaochengcheng/received_events","type":"User","site_admin":false},"created_at":"2017-07-06T22:03:23Z","updated_at":"2017-07-06T22:03:23Z","body":"Hi Felix,\r\n## About the Failing of the domain `afp.com`\r\nIt seems that this site is a little odd: you can visit it by `www.afp.com`, but the domain `afp.com` does not exist. Here is some ping information:\r\n```\r\nping afp.com\r\nping: unknown host afp.com\r\n\r\nping www.afp.com\r\nPING e10157.e12.akamaiedge.net (23.194.98.182) 56(84) bytes of data.\r\n64 bytes from a23-194-98-182.deploy.static.akamaitechnologies.com (23.194.98.182): icmp_seq=1 ttl=56 time=7.41 ms\r\n```\r\nThere are several ways to resolve this problem. One is by using a YAML file to load this site. You can check the sample file `sites.sample.yaml`. Here is an example of this site:\r\n```\r\n### afp.com\r\n  # required, name of site\r\n- name: afp.com\r\n  # required, primary domain of factcheck.org\r\n  domain: afp.com\r\n  # required, type of this site, it is a fact checking site\r\n  site_type: YOU SITE TYPE\r\n  # base URL, USING www.afp.com\r\n  base_url: http://www.afp.com/\r\n  # site tags, default [], more about this site\r\n...\r\n```\r\nPlease check https://github.com/IUNetSci/hoaxy-backend/blob/master/hoaxy/data/manuals/sites.readme.md\r\n\r\nAnother way is by altering the database. When loading the domain list, using `--force-inactive` to force loading this site, and then update the table `site` , the SQL command could be:\r\n```SQL\r\nUPDATE site\r\nSET base_url='http://www.apf.com/, is_alive=True\r\nWHERE domain LIKE 'apf.com'\r\n```\r\n\r\n## About `afp.com/de`\r\nSorry to say that currently, hoaxy could not track site based on URLs. Maybe in the future, we can provide some kind of filter hook to apply filtering. Right now, what you could do is just using domain `afp.com` to track all related URLs (of course, this will include `afp.com/de`).\r\n\r\nThanks"}}
{"actor":{"display_login":"shaochengcheng"}}