The current setup for Dev Containers was not working, with multiple
different errors. So, in order to restore its funcionality (and allow
for things like linting and debugging), the following changes were made:
- The Dockerfile was severely alterered. Now, the `docker-php-ext-enable` binary is installed before its usage,
it points to the correct PHP binary, and we install Composer for for
loading dev-dependencies later-on.
- Moved the "postCreateCommand" section (defined on the `devcontainer.json` file) into its own script file (for a
more readable experience)
- On the post-creation script, moved the `xdebug.ini` to the correct
directory (alongside the PHP-FPM bin), installed PHPUnit,
PHPCodesniffer (and the 'PHP Compatibility' sniffer) with Composer on
a global location, and changed owner of the `cache` directory
- Changed VSCode-specific customization setting in order to point to the
update some binary paths. Also made sure globally-installed composer
packages binaries are accessible via PATHdocker-php-ext-enable
libcurl-impersonate was not being used properly, as the code was
overriding the headers set by it to prevent detection.
- update the libcurl-impersonate to an actively managed lexiforest
fork
- impersonate Chrome 131
- move the defaultHttpHeaders to http.php, where it belongs
- only set defaultHttpHeaders if curl-impersonate is not detected
- make useragent ini setting optional and disabled by default
- add necessary documentation updates
* [TikTokBridge] Use oEmbed for video metadata
Fetches oEmbed-formatted metadata for videos through the TikTok API to
provide post titles, thumbnails, and authors. This hasn't yet been
tested, so it's possible it doesn't work.
* [TikTokBridge] Add back view count parsing
oops
* [TikTokBridge] Prepend www to the oEmbed API endpoint URL
The non-www URL resulted in a 301 redirect to the www URL, so this just
skips that redirect, improving performance a bit and hopefully helping
with the 400 errors.
* [TikTokBridge] Retry failed OEmbed requests
If an OEmbed request fails, retry a few times, waiting a bit in between
each retry. This should fix the problem for the most part, since I think
the problem was related to some sort of rate limit (it isn't mentioned
in the docs, but it seems to only happen when sending large quantities
of sequential requests).
* FeedExpander: Remove tailing content in XML
- Move preprocessing code into overridable preprocessXml()
- Auto-remove trailing data after root xml node
* FeedExpander: Add PR reference with use case
* FeedExpander: Code linting
* [FeedExpander] Keep content at end of document for now
Will add back later if more sites have the same issue
* [FeedExpander] prepareXml: Add type hints