{"action":"opened","issue":{"url":"https://api.github.com/repos/SSilence/selfoss/issues/806","repository_url":"https://api.github.com/repos/SSilence/selfoss","labels_url":"https://api.github.com/repos/SSilence/selfoss/issues/806/labels{/name}","comments_url":"https://api.github.com/repos/SSilence/selfoss/issues/806/comments","events_url":"https://api.github.com/repos/SSilence/selfoss/issues/806/events","html_url":"https://github.com/SSilence/selfoss/issues/806","id":180324597,"number":806,"title":"Reddit spout doesn't follow 301 directive","user":{"login":"bouncingbunyip","id":11684665,"avatar_url":"https://avatars.githubusercontent.com/u/11684665?v=3","gravatar_id":"","url":"https://api.github.com/users/bouncingbunyip","html_url":"https://github.com/bouncingbunyip","followers_url":"https://api.github.com/users/bouncingbunyip/followers","following_url":"https://api.github.com/users/bouncingbunyip/following{/other_user}","gists_url":"https://api.github.com/users/bouncingbunyip/gists{/gist_id}","starred_url":"https://api.github.com/users/bouncingbunyip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bouncingbunyip/subscriptions","organizations_url":"https://api.github.com/users/bouncingbunyip/orgs","repos_url":"https://api.github.com/users/bouncingbunyip/repos","events_url":"https://api.github.com/users/bouncingbunyip/events{/privacy}","received_events_url":"https://api.github.com/users/bouncingbunyip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-30T14:55:47Z","updated_at":"2016-09-30T14:55:47Z","closed_at":null,"body":"I have added the /r/pics/ subreddit as a spout.\r\n\r\nSome of the entries in the subreddit return a 301, and I see the following in the `items` table:\r\n&lt;?xml version=\"1.0\" standalone=\"yes\"?&gt;\r\n&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\"&gt;\r\n301 Moved Permanently&#xd;\r\n<h1>301 Moved Permanently</h1>&#xd;\r\nnginx/1.4.7&#xd;\r\n\r\nThis is the 'share' link on reddit to the entry:\r\nhttps://www.reddit.com/r/pics/comments/555nqo/get_a_hammock_they_said/?ref=share&ref_source=link\r\n\r\nI have seen this on a few entries but I'm not sure how to reliably 'force' it to happen.\r\n\r\nReading through the issues, there's a suggestion to fix the instapaper spout with:\r\ncurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE);\r\n\r\nSo I've added that to my reddit2.php file_get_contents_curl() method, to see if it works.  I'll keep you posted.\r\n\r\n"}}
{"actor":{"display_login":"bouncingbunyip"}}