yangqi / htmldom Goto Github PK
View Code? Open in Web Editor NEWA Htmldom package for Laravel 4 based on Simple HTML Dom Parser
License: MIT License
A Htmldom package for Laravel 4 based on Simple HTML Dom Parser
License: MIT License
When I execute an example from home page here, I get this error
Call to a member function find() on a non-object
Strange thing is that when I execute this on my localhost, it works as expected, but on remote server it fails. With this error.
Also, when i
var_dump($html)
I can see that it is an object. So any ideas?
Hi!
Do you plan a Laravel 5 version of you package? Thanks
Hi can we get the latest version for this? from master branch
if (!preg_match("/^[\w-:]+$/", $tag)) {
etc fail
See
1) Data\Test\TestCase\Lib\GeoImportLibTest::testImportCountiesCH
preg_match(): Compilation failed: invalid range in character class at offset 4
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:528
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:332
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:164
/home/travis/build/dereuromark/cakephp-data/vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:122
Hello,
I have a composer message : "Class 'Yangqi\Htmldom\HtmldomServiceProvider' not found"
Hi @yangqi
https://github.com/yangqi/Htmldom/blob/master/src/Yangqi/Htmldom/HtmldomServiceProvider.php#L21
this this the problem when using this in laravel 6
I got following Error when I tried with secured url:
ErrorException in Htmldom.php line 178: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
However, I fixed this issue with following extra arguments passed in load_file() method after
$args = func_get_args(); line
in Htmldom class.
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$args[1]=false;
$args[2]=stream_context_create($arrContextOptions);
Just wondering if the author can push it built-in with much cleaner/optimized way instead of hard-coding like I did above.
Is this package abandoned? I'm having issues while upgrading my laravel project.
In HtmldomServiceProvider.php line 21:
Call to undefined method Yangqi\Htmldom\HtmldomServiceProvider::package()
I also saw someone has already sent the PR against this. But I think it's not merged yet. Please correct me if I'm wrong. Is there anything I'm doing wrong?
Why the method save() is protected?
I can't access using object instance
Is there anyway we can get HTML response status (200, 404 etc....)?
Hi considering release new version? instead use of dev-master
in our projects
please change the constructor, to add support for https urls!
if (preg_match("/^https?:\/\//i",$str) || is_file($str))
{
$this->load_file($str);
}
Only for laravel 5? not for 5.2?
Hi. Awesome work with this repo.
Quick question: why is there a max file size option?
Ref: Line of code
Hello!
use Yangqi\Htmldom\Htmldom;
new Htmldom('https://www.imdb.com/title/tt0115433/');
file_get_contents(): SSL: Connection reset by peer /vendor/yangqi/htmldom/src/Yangqi/Htmldom/Htmldom.php:178
while it's hard for me to tell if this problem is persistent or intermittent, but the problem exists
maybe add ssl.verify_peer_name = false
to the $context of file_get_contents()
Dear Yangqi,
Is there anyway to fetch all html elements like
$html = new \Htmldom($body); foreach ($html as $element) { echo $element->tag; }
Thanks.
How can I change the user agent?
in Htmldom.php:
public function str_get_html($str, $lowercase = true, $forceTagsClosed = true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN = true, $defaultBRText = DEFAULT_BR_TEXT, $defaultSpanText = DEFAULT_SPAN_TEXT)
{
if (empty($str) || $strlen($str) > MAX_FILE_SIZE)
{
return false;
}
$this->load($str, $lowercase, $stripRN);
return $this;
}
$strlen should just be strlen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.