Comments (11)
from tjsp_processo_leitor.
Pode ser o mesmo regex, só que prciso que ele adicone o espaço depois de remover a quebra de linha, para que as palavras não fiquem juntas
from tjsp_processo_leitor.
from tjsp_processo_leitor.
Nada ainda, me retorna sempre um erro 500
from tjsp_processo_leitor.
$num_processo = $processo->numero; $html = file_get_contents($url.$num_processo); //$html = str_replace(array('\r\n', '\n', '\r'), ' ', $html); $html = preg_replace('/^\s+|\n|\r+$/m', '', $html); $doc = new DOMDocument(); @$doc->loadHtml($html); $data = []; $tblmovimentacoes = @$doc->getElementById('tabelaTodasMovimentacoes'); foreach (@$tblmovimentacoes->childNodes as $t) { if($t->lastChild->firstChild->nodeValue != $t->lastChild->nodeValue) $data[] = ['data' => $t->firstChild->nodeValue, 'desc1' => trim($t->lastChild->firstChild->nodeValue), 'desc2' => trim(str_replace($t->lastChild->firstChild->nodeValue, '', $t->lastChild->nodeValue))]; else $data[] = ['data' => $t->firstChild->nodeValue, 'desc1' => trim($t->lastChild->firstChild->nodeValue), 'desc2' => '']; }
from tjsp_processo_leitor.
Com o código acima ele me retorna, mas com os espaços removidos
from tjsp_processo_leitor.
from tjsp_processo_leitor.
Voltei ao código original e dei só um espaço nas aspas no preg_replace, ele da o erro Trying to get property of non-object quando entra no foreach
from tjsp_processo_leitor.
from tjsp_processo_leitor.
Marcos, TJCE, verifiquei e existe o mesmo ID na DIV, inclusive, consegui fazer rodar localmente, mas quando joguei pro servidor deu erro no foreach
from tjsp_processo_leitor.
from tjsp_processo_leitor.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tjsp_processo_leitor.