Porn Data Anaylize — 分类数据二次分析

我真的是以欣赏的角度看的,挺好看。很有态度,感觉真的像一个传媒公司,镜头,画面,转场,特写都很专业。艺人也是很敬业,很佩服他们. ..
U1S1演员确实没研究,怎么说也是小电影还是需要演技的。但这些演员都是真刀真枪的干。要是能真的请到传媒学院的或者那些圈里的明星估计会更好。– 糊胡涂

我没有要传播色情的意思,只是对于爬取的数据进行分析的时候,总会有些出乎意料的发现。在国内所有的情色内容都是不合法的,但是违法的事情确并没有因此而销声匿迹。通过最近的分析,我发现色情产业这个规模异常的庞大。原来想写一篇简单的分析文章,现在却发现自己分析的不过是冰山一角。现在的色情行业已经不再仅仅局限于提供色情视频的观看,点播下载。现在基于各种直播平台的在线直播,打赏,网红主播,TS CD,甚至有专门的编剧,导演拍摄,并且喊着口号甚至要超越日本,成为世界第一。

大家好,我是麻豆傳媒P先生。 謝謝大家一直對麻豆的支持,我們想打造屬於華人的中文市場,不讓日本一直走在我們前面,我們持續努力前行,打造華人的驕傲! 最近有許多人不斷的盜取麻豆的原創影片,我想這可能是大家還不習慣屬於華人國產影片的出現。感謝所有的同行跟我們一起努力,為每個人的夜晚去打造歡愉,但是盜取麻豆的影片只會讓歡愉更快的消失,讓華人國產停滯不前。 –麻豆传媒

Continue Reading

Porn Data Anaylize — TS伪娘 分类数据浅析

所谓“伪娘”,即通过女装、化妆等手法让外人认为是女性的男性,我们通常可以在各地的漫展上看到相当数量的“伪娘”,这也是二次元文化中的萌属性之一。
而“药娘”则不同,简单来说就是心理性别为女,生理性别为男的跨性别者,他们通常是依靠激素药物改变内分泌,从而让自己身体特征逐渐接近女性。这个群体的人数非常稀少且又特殊,直至去年(2016年?根据参考链接文章编辑时间推测。)才在网络上出现相关讨论,但目前并没有引起社会的广泛关注。

Continue Reading

BeautifulSoup抓取js变量

页面代码:

< div class="myplayer" >
< div class="m1938" >
< script type="text/javascript" >var player_data={"flag":"play","encrypt":0,"trysee":0,"points":0,"link":"\/index.php\/vod\/play\/id\/9221\/sid\/1\/nid\/1.html","link_next":"","link_pre":"","url":"https:\/\/lbbf9.com\/20200325\/WX8h2pjI\/index.m3u8","url_next":"","from":"lbm3u8","server":"no","note":""}< /script >        < script type="text/javascript" src="/static/js/playerconfig.js?t=20200913" >< /script >< script type="text/javascript" src="/static/js/player.js?t=20200913" >< /script >
< style >.MacPlayer{background: #000000;font-size:14px;color:#F6F6F6;margin:0px;padding:0px;position:relative;overflow:hidden;width:100%;height:100%;min-height:100px;}.MacPlayer table{width:100%;height:100%;}.MacPlayer #playleft{position:inherit;!important;width:100%;height:100%;}< /style >
< div class="MacPlayer" >< iframe id="buffer" src="" frameborder="0" scrolling="no" width="100%" height="100%" style="position: absolute; z-index: 99998; display: none;" >< /iframe >< iframe id="install" src="" frameborder="0" scrolling="no" width="100%" height="100%" style="position:absolute;z-index:99998;display:none;" >< /iframe >
< table border="0" cellpadding="0" cellspacing="0" >
< tbody >
< tr >
< td id="playleft" valign="top" style="" >< iframe width="100%" height="100%" src="/static/player/dplayer.html" frameborder="0" allowfullscreen="true" border="0" marginwidth="0" marginheight="0" scrolling="no" >< /iframe >< /td >
< /tr >
< /tbody >
< /table >
< /div >
< script src="/static/player/lbm3u8.js?v=0.5806522403562584" >< /script >< /div >
< /div >

Python代码:

from bs4 import BeautifulSoup as bs
import re
import json
import requests

def get_m3u8_link(url):
    # 直接正则匹配
    print('_' * 70)
    print('[A] 解析播放地址......')
    html_doc = get_url_source_code(url)
    bs = BeautifulSoup(html_doc, "html.parser")
    pattern = re.compile(r"var cms_player = {(.*?);$", re.MULTILINE | re.DOTALL)
    surls = bs.find('script', text=pattern)
    js_string = str(surls.text).replace('var cms_player = ', '').replace(';', '')
    json_data = json.loads(js_string)
    m3u8_link = json_data['url']
    title = bs.title.string
    print('[A] 标题:' + title)
    print('[A] 播放地址:' + m3u8_link)
    print('_' * 70)
    return m3u8_link, title
Continue Reading

Porn Data Anaylize — AI换脸 分类数据浅析(github)

声明:本文中所有数据都是来源于第三方福利网站的数据,本文仅对数据中相关的信息进行解析。本人非常喜欢这些女明星,绝无抹黑之意。

from pyspark.sql.functions import col
import altair as alt
import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline
csv = spark.read.option("header",True).csv("hdfs://localhost:9000/data2/porn_data_movie.csv")
csv.printSchema()
root
 |-- id: string (nullable = true)
 |-- create: string (nullable = true)
 |-- update: string (nullable = true)
 |-- name: string (nullable = true)
 |-- describe: string (nullable = true)
 |-- source_id: string (nullable = true)
 |-- publish_time: string (nullable = true)
 |-- play_count: string (nullable = true)
 |-- good_count: string (nullable = true)
 |-- bad_count: string (nullable = true)
 |-- link_count: string (nullable = true)
 |-- comment_count: string (nullable = true)
 |-- designation: string (nullable = true)
 |-- category_id: string (nullable = true)
 |-- porn_site_id: string (nullable = true)
 |-- uploader_id: string (nullable = true)
 |-- producer: string (nullable = true)
Continue Reading

Porn Data Anaylize — 上传者 分类信息分析(github)

'''
视频作者 视频分类信息分析
http://www.h4ck.org.cn
by obaby
obaby@mars
email:root@obaby.org.cn
date: 2020.09.04
'''
from pyspark.sql.functions import col
import altair as alt
import pandas as pd
from matplotlib import pyplot as plt
%matplotlib inline
csv = spark.read.option("header",True).csv("hdfs://localhost:9000/data2/porn_data_movie.csv")
csv.printSchema()
root
 |-- id: string (nullable = true)
 |-- create: string (nullable = true)
 |-- update: string (nullable = true)
 |-- name: string (nullable = true)
 |-- describe: string (nullable = true)
 |-- source_id: string (nullable = true)
 |-- publish_time: string (nullable = true)
 |-- play_count: string (nullable = true)
 |-- good_count: string (nullable = true)
 |-- bad_count: string (nullable = true)
 |-- link_count: string (nullable = true)
 |-- comment_count: string (nullable = true)
 |-- designation: string (nullable = true)
 |-- category_id: string (nullable = true)
 |-- porn_site_id: string (nullable = true)
 |-- uploader_id: string (nullable = true)
 |-- producer: string (nullable = true)
csv.select('name', 'describe', 'uploader_id').show()
Continue Reading

Porn Data Anaylize — 视频数据初探

'''
--------------------------------------------------------------------------------
福利数据解析
基础数据分析,标题分词,词频统计
-----------------------------------
by:obaby
email: root@obaby.org.cn
blog:http://www.h4ck.org.cn
===================================
参考链接:https://sparkbyexamples.com/pyspark/select-columns-from-pyspark-dataframe/
-------------------------------------------------------------------------------
'''
import jieba
# 通过spark read csv格式文件,从csv header解析数据结构
csv = spark.read.option("header",True).csv("hdfs://localhost:9000/data2/porn_data_movie.csv")
# 数据格式
csv.printSchema()
root
 |-- id: string (nullable = true)
 |-- create: string (nullable = true)
 |-- update: string (nullable = true)
 |-- name: string (nullable = true)
 |-- describe: string (nullable = true)
 |-- source_id: string (nullable = true)
 |-- publish_time: string (nullable = true)
 |-- play_count: string (nullable = true)
 |-- good_count: string (nullable = true)
 |-- bad_count: string (nullable = true)
 |-- link_count: string (nullable = true)
 |-- comment_count: string (nullable = true)
 |-- designation: string (nullable = true)
 |-- category_id: string (nullable = true)
 |-- porn_site_id: string (nullable = true)
 |-- uploader_id: string (nullable = true)
 |-- producer: string (nullable = true)
Continue Reading

Porn Data Anaylize — Hadoop安装

这是一个系列的数据分析相关项目,包括环境搭建,数据分析,分析代码,分析报告等。目前数据来源于爬取到的100,000+数据
文章主要介绍相关的方法和原理,也算是自己对于大数据的一个初步的认识。

代码不会涉及具体的数据信息。如果需要相关的数据,可以参考以下文章自己爬取相关的数据信息:

某加密到牙齿的APP数据加密分析
攻城略地 再下一Porn

安装参考的是《Python + Spark 2.0+Hadoop机器学习与大数据实战》(林大贵 著),首先吐槽一下,林大贵的几本书前几章的内容完全一样,尤其是上面提到的这本与《Hadoop + Spark大数据巨量分析与机器学习实战》,两本书前7章内容完全一致。
买了两本书其实相当于买了一本半,并且重复的都是非常基础的部分。对于整本书来说倒是降低了写作的难度和时间,并且两本书的实例也基本一致,不过使用的语言略有不同。
书上介绍的安装版本比较老旧,也没有必要去安装一个老旧的版本。所以这里我安装的是3.3.0 具体的安装流程可以参考这个链接:http://hadoopspark.blogspot.com/2015/09/4-hadoop-26-single-node-cluster.html

不过需要注意的是里面的几条命令可能稍微有些问题: 使用下面的这条命令生成的key文件对应的host是本机的主机名:

ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa

如果系统没有设置hostname,可以使用下面的命令生成key:

ssh localhost ssh-keygen -t rsa

两者的区别在于第一条命令生成的是username@hostname,第二条名称生成的是username@localhost

Continue Reading