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

[TwitterBridge] Get cookies before sending request #1232

Merged
merged 2 commits into from
Jul 26, 2019
Merged

[TwitterBridge] Get cookies before sending request #1232

merged 2 commits into from
Jul 26, 2019

Conversation

triatic
Copy link
Contributor

@triatic triatic commented Jul 26, 2019

Twitter now requires cookies to be set before requesting a page. This will fetch the cookies and send them to getSimpleHTMLDOM().

Fixes #1225 #1231
Supersedes PR #1226
Function to get cookies borrowed from @teromene / FB2Bridge

Twitter now requires cookies to be set before requesting a page. This will fetch the cookies and send them to `getSimpleHTMLDOM()`.
@Roliga
Copy link
Contributor

Roliga commented Jul 26, 2019

This may be the better approach yes, I didn't realize file_get_contents() was used in getContents()!

A slight downside with this is that as far as I can tell it doesn't take proxy settings into account, which could be problematic in some cases. Though I suppose if the FB2Bridge is already doing it this way maybe it's fine.

@teromene teromene merged commit 2bb9480 into RSS-Bridge:master Jul 26, 2019
@teromene
Copy link
Member

Thanks for the fix !

@triatic
Copy link
Contributor Author

triatic commented Jul 26, 2019

@Roliga file_get_contents() is a fallback method added some months ago for systems running CLI without a curl cainfo certificate bundle specified, due to certificate peer failures. Unlike the curl module, file_get_contents() automatically reads in the system's root certificates.

The function doesn't currently respect headers passed in (such as the cookie one just added) so I'll need to PR that.

infominer33 pushed a commit to web-work-tools/rss-bridge that referenced this pull request Apr 17, 2020
* [TwitterBridge] Get cookies before sending request

Twitter now requires cookies to be set before requesting a page. This will fetch the cookies and send them to `getSimpleHTMLDOM()`.

* Formatting fixes
@triatic triatic deleted the patch-3 branch April 21, 2020 01:07
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.

Twitter @bbcbreaking failed with error 500
3 participants