vezaynk / Sitemap-Generator-Crawler

PHP script to recursively crawl websites and generate a sitemap. Zero dependencies.
https://www.bbss.dev
MIT License
241 stars 92 forks source link

Reports empty error after finishing #89

Closed mylselgan closed 3 years ago

mylselgan commented 3 years ago

Previously this script worked well on my site (with more than 12000 urls). but from yesterday onwards it is not creating sitemap.xml file after finishing. After running for more than 3 hours it just ends with "Error". I executed the script on command line.

 [+] Added: https://mysite.com/finalurl
 [+] Found xmllint, pretty-printing sitemap
Error: 

Please guide me in the right way to fix this issue.

vezaynk commented 3 years ago

Looks like xmllint is failing for you.

Try to find the temporary file its working with and post it.

Remove this if block, see if it helps: https://github.com/knyzorg/Sitemap-Generator-Crawler/blob/41731c550bcc9542afc3a92ee111ac5d3407d16e/sitemap.php#L107

I have a suspicion that the script is outputting invalid xml for some reason. and xmllint is blowing up because of it.