freeufcdotinfo
Power Member
- Jun 12, 2008
- 685
- 157
Is this possible other than doing it manual - need every URL from domain to a txt file.
http://wordpress.org/extend/plugins/wp-web-scrapper/
Thanks but I dont think this will do what I want.
I have several wp blogs - each with 1000's of posts
each post has url such as
domain.com/blahblah.htm
need the urls exported to txt file
ScrapeBox has a sitemap scraper.
If your WP blog doesn't already have a sitemap, simply install this plugin (it's free):
http://wordpress.org/extend/plugins/google-sitemap-generator/
It takes about two seconds, and will build a sitemap for your site which lists every URL your WP site has.
Then use the SB "sitemap scraper" addon to scrape the sitemap, which it will then export every URL it scraped into a .txt file.
All in all, this will take less than 3 minutes, from start to finish.
<?php
// Sitemap url extractor
// Upload this to your hosting to extract plain text urls from your sitemap
// You must install the xml sitemaps plugin to generate the sitemap for your blog
// Then enter the sitemap url in the form and press submit button
// pwned by Autumn @ BHW
// Fetch sitemap and extract urls
if($_POST['save'] == 'yes') {
// Fetch the sitemap
$sitemap_url = $_POST['sitemap_url'];
$html = file_get_contents($sitemap_url) or die("ERROR: Could not fetch sitemap");
//echo "$html\n";
// Strip out urls
preg_match_all('/<loc>([^<]*)<\/loc>/imsU', $html, $regs);
// Print urls if found
if($regs) {
//echo "<pre>";
//print_r($regs);
//echo "</pre>";
foreach($regs[0] as $url) {
echo "$url<br>\n";
}
} else {
// Otherwise print error message and original xml
echo "ERROR: No urls found<br>\n";
echo "Here is your original xml:<br>\n";
// Convert angle brackets for each display
$html = preg_replace('/</', '<', $html);
$html = preg_replace('/>/', '>', $html);
// Echo original xml
echo "<pre>\n";
echo "$html\n";
echo "</pre>\n";
}
exit;
}
// Print form to enter the sitemap url
echo '<html>
<head>
<title>Sitemap to url extractor</title>
</head>
<body>
Enter your sitemap url eg. http://www.yourdomain.com/sitemap.xml :<br>
<form action="'. $_SERVER['PHP_SELF'] .'" method="post">
<input type="hidden" name="save" value="yes">
<input type="text" name="sitemap_url" size="80">
<input type="submit" name="submit" value="Extract urls from sitemap">
</form>
<br>
</body>
</html>';
?>
Here is a simple PHP script for people who don't have / don't want to use Scrapebox.
Im not sure its what you looking for but you can try this one :
Also just google it there is tons of resultsCode:http://wordpress.org/extend/plugins/wp-web-scrapper/![]()
And im not that familiar with Scrapebox although i have it just not using it to much but i know you can do it with that.