辐射2.0中文内购破解版4出破解版了吗,刚下载一个,闪退

博客搬迁记 - 从WordPress到Hexo - 推酷
博客搬迁记 - 从WordPress到Hexo
今天早上打开电脑第一件事就是把pages绑定了域名,从此便可以使用
http://imys.net
进行访问了。
至此已经折腾的差不多了,在此记录下搬迁过程中遇到的一些问题及解决办法。
Hexo3本地部署
现在node下安装的hexo一般都是最新版本,网上搜索到的一些教程不乏是老版本的,要特别留意。
以上两篇文章应该能使你顺利的在
http://localhost:4000/
看到自己的新博客,并且你也熟悉了Hexo的常用命令。
Hexo无法解析模板文件
本地预览页面显示:
&%- partial('_partial/head') %&
&%- partial('_partial/header') %&
&%- body %&
&% if (theme.sidebar && theme.sidebar !== 'bottom'){ %& &%- partial('_partial/sidebar') %& &% } %&
&%- partial('_partial/footer') %&
&%- partial('_partial/mobile-nav') %& &%- partial('_partial/after-footer') %&
在工程目录执行下面3个命令,高版本的hexo移除默认的ejs。
$ npm install hexo-renderer-ejs --save
$ npm install hexo-renderer-stylus --save
$ npm install hexo-renderer-marked --save
上传到GitCafe
以上两篇内容结合着看,不过对第一次操作这些的人来说可能会遇到一些问题。
当命令窗口出现以下信息时,需要你输入
passphrase
口令。不过在我操作时输入口令的话是无法生成成功的,直接按
Enter passphrase (empty for no passphrase):
第一次在本地设置git时,需设置用户标识。
$ git config --global user.name &yourname&
//gitcafe上的用户名
$ git config --global user.email &&
//填写自己的邮箱
设置本地gitcafe-pages版本库
GitBash进入本地Hexo目录
git checkout -b gitcafe-pages
创建Gitcafe-Pages分支,并切换到该分支。
(.)点表示当前目录下的所有内容,交给git管理,也就是提交到了git的本地仓库。
上传到gitcafe
修改hexo配置文件,即config.yml,如下配置:
repository: git@gitcafe.com:yourname/yourname.git
branch: gitcafe-pages
yourname 修改成你的用户名,如我的是:
:justgo/justgo.git
保存后直接在
hexo g && hexo d
上传即可(我在这一步折腾了很久,在cmd下运行
命令会出错)。
稍等片刻,打开
http://youname/gitcafe.io
便可以看到自己的博客了。
WordPress文章迁移
WordPress 后台可以直接导出wordpress.xml文件,把这个文件放入你的本地Hexo目录下,然后安装一个插件可以直接生成每篇文章的Markdown文件。
npm install hexo-migrator-wordpress --save
//安装插件
hexo migrate wordpress wordpress.xml
//生成Markdown
生成后的文件稍微修改一下格式就可以上传了。
庆幸的是我博客里的图片不多,不需要太多的链接修改。
不过以后我也开始使用七牛存储了,免得以后搬迁麻烦。
Hexo配置优化
无法开启RSS和sitemap
http://localhost:4000/atom.xml
Cannot GET atom.xml
http://localhost:4000/sitemap.xml
Cannot GET sitemap.xml
这个问题困扰了我很长的时间,因为我的插件安装和配置都是照着
分毫不差的进行的,可是google了几个小时都没解决!
插件也重装更新了几次,想过重新初始化Hexo,怕会丢失原来的一些配置,最后在
hexo/package.json
中找到了原因。
package.json:
&name&: &hexo-site&,
&version&: &0.0.0&,
&private&: true,
&version&: &3.0.1&
&dependencies&: {
&hexo&: &^3.0.0&,
&hexo-admin&: &^0.3.0&,
&hexo-deployer-git&: &0.0.4&,
&hexo-generator-archive&: &^0.1.0&,
&hexo-generator-category&: &^0.1.0&,
&hexo-generator-index&: &^0.1.0&,
&hexo-generator-tag&: &^0.1.0&,
&hexo-generator-feed&: &^1.0.1&,
&hexo-generator-sitemap&: &^1.0.1&,
&hexo-migrator-wordpress&: &^0.1.2&,
&hexo-renderer-ejs&: &^0.1.0&,
&hexo-renderer-marked&: &^0.2.4&,
&hexo-renderer-stylus&: &^0.2.0&,
&hexo-server&: &^0.1.2&
检查此文件中是否包括了
hexo-generator-tag
hexo-generator-sitemap
,没有的话添加一下。
插件版本号查看对应插件下的
package.json
文件,其他插件的类似问题应该也可以尝试这样解决。
已发表评论数()
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见
正文不准确
标题不准确
排版有问题
主题不准确
没有分页内容
图片无法显示
视频无法显示
与原文不一致WordPress(1)
源码地址:
使用Jsoup工具包,将博客正文抓取下来,解析出文章标题、发布时间、文章正文、下一篇链接等内容。写入到指定格式的模板中。
import org.jsoup.J
import org.jsoup.nodes.D
import org.jsoup.nodes.E
import org.jsoup.select.E
import java.io.*;
import java.util.regex.M
import java.util.regex.P
* CSDN博客备份工具
* Created by lxg on .
public class Reptile {
static Pattern p = null;
static Matcher m = null;
* 获取文章内容节点
* articleUrl
* IOException
static Element getContentElement(String articleUrl) throws IOException {
String url = "http://blog.csdn.net" + articleU
Document doc = Jsoup.connect(url)
.header("Accept", "*/*")
.header("Accept-Encoding", "gzip, deflate")
.header("Accept-Language", "zh-CN,q=0.8,en-US;q=0.5,q=0.3")
.header("Referer", "/")
.header("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/ Firefox/48.0")
.timeout(5000)
Element div = doc.getElementById("article_details");
* 获取文章标题
static String getTitle(Element div) {
Elements span = div.select("span.link_title");
Element a = span.get(0).child(0);
String title = a.html();
System.out.println(a.html());
* 判断文章是原创还是转载
static boolean getArticlType(Element div){
Elements span = div.select("span.ico_type_Repost");
if(span.size() == 0){
return false;
return true;
* 获取文章发布时间
static String getPostDate(Element div) {
Elements postDate = div.select("span.link_postdate");
String date = postDate.get(0).html();
* 获取文章正文
static String getAtricleContent(Element div) {
Element atricle_content = div.getElementById("article_content");
String atricle = atricle_content.html();
* 去除冗余的html标签
static String replaceRedundancyElement(String atricle) {
String okContent =
String regEx = "&script[^&]*?&[\\s\\S]*?&\\/script&";
p = pile(regEx);
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&div (.*?)&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&/div&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&span (.*?)&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&/span&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&p (.*?)&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&/p&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&p&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("");
p = pile("&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("&");
p = pile("&");
m = p.matcher(okContent);
if (m.find()) {
okContent = m.replaceAll("&");
return okC
* 处理正文中的特殊字符
static String handlSpecialChar(String atricle){
p = pile("\\$");
m = p.matcher(atricle);
if (m.find()) {
atricle = m.replaceAll("\\\\\\$");
p = pile("\\{");
m = p.matcher(atricle);
if (m.find()) {
atricle = m.replaceAll("\\\\\\{");
p = pile("\\}");
m = p.matcher(atricle);
if (m.find()) {
atricle = m.replaceAll("\\\\\\}");
* 处理文件名中的特殊字符
static String handlSpecialCharForTitle(String title){
p = pile("\\\\");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("\\/");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile(":");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("\\*");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("\\?");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("\\|");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("&");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("&");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
p = pile("\"");
m = p.matcher(title);
if (m.find()) {
title = m.replaceAll("");
* 获取下一篇文章链接
static String getNextHref(Element div){
Elements nextArticle = div.getElementsByClass("next_article");
if(nextArticle.size() == 0){
return null;
String nextHref = nextArticle.get(0).child(1).attr("href");
return nextH
* 读取模板,生成文章
* okContent
* Exception
static void create(String title, String date, String okContent, String template) throws Exception {
String page = replace(template, "title", title);
page = replace(page, "post_date", date);
page = replace(page, "content", okContent);
RandomAccessFile randomFile = null;
randomFile = new RandomAccessFile("E:\\test.xml", "rw");
randomFile.seek(randomFile.length()-18);
randomFile.write(("\n\t"+page+"&/channel&\n&/rss&").getBytes("UTF-8"));
randomFile.close();
static void create1() throws Exception{
InputStream is = Reptile.class.getClassLoader().getResourceAsStream("template1.xml");
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "utf-8"));
String line = reader.readLine();
StringBuffer buffer = new StringBuffer();
while (line != null) {
buffer.append(line);
buffer.append("\n");
line = reader.readLine();
reader.close();
is.close();
String str = new String(buffer.toString().getBytes("UTF-8"));
RandomAccessFile randomFile = null;
randomFile = new RandomAccessFile("E:\\test.xml", "rw");
randomFile.seek(randomFile.length());
randomFile.write(str.getBytes("UTF-8"));
* 替换模板文件中的内容
static String replace(String str, String name, String content) {
p = pile("\\$" + name);
m = p.matcher(str);
str = m.replaceAll(content);
public static void main(String[] args) throws Exception {
String nextHref = "/u/article/details/";
create1();
InputStream is = Reptile.class.getClassLoader().getResourceAsStream("template2.xml");
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "utf-8"));
String line = reader.readLine();
StringBuffer buffer = new StringBuffer();
while (line != null) {
buffer.append(line);
buffer.append("\n\t");
line = reader.readLine();
reader.close();
is.close();
String str = new String(buffer.toString().getBytes("UTF-8"));
while (nextHref != null){
Element div = getContentElement(nextHref);
String title = getTitle(div);
System.out.println("************正在下载:"+title+"************");
String date = getPostDate(div);
String atricle = getAtricleContent(div);
String okContent = replaceRedundancyElement(atricle);
okContent = handlSpecialChar(okContent);
nextHref = getNextHref(div);
if(getArticlType(div)){
title = "[转]" +
String template =
create(title,date,okContent,str);
System.out.println("************下载完成:"+title+"************");
System.out.println();
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:35193次
排名:千里之外
原创:43篇
转载:40篇
(5)(2)(1)(5)(5)(3)(2)(10)(4)(2)(12)(5)(2)(3)(3)(2)(10)(4)(1)(1)(2)(1)

我要回帖

更多关于 辐射2.0中文内购破解版 的文章

 

随机推荐