コード例 #1
0
def findList_AML_TwitterInfo(username):
    hj = TwitterInfo.objects.filter(user_id=username)

    twInfoNameList = []
    twInfoJoinDateList = []
    for a in range(len(hj)):
        username = hj[a].username  # 트위터이름정보
        joinedDate = hj[a].joined_date  # 트위터가입일자정보

        #리스트 생성
        twInfoNameList.append(username)
        twInfoJoinDateList.append(str(joinedDate))

    result_tw_infoNameDict = generator.gen_AlphabeticalDict(
        twInfoNameList, '트위터사용자이름')
    result_tw_infoJoinDateDict = generator.gen_AlphabeticalDict(
        twInfoJoinDateList, '트위터팔로워가입일시')

    # merge two dictionary which has same keys.
    result_tw_userInfoTot = defaultdict(list)

    # Merge two Dictionary
    for k, v in chain(result_tw_infoNameDict.items(),
                      result_tw_infoJoinDateDict.items()):
        result_tw_userInfoTot[k].append(
            str(v).replace('[', '').replace(']', '').replace('\'', ''))

    print('final_03: ', result_tw_infoNameDict, result_tw_infoJoinDateDict,
          "=>", result_tw_userInfoTot)

    return username, result_tw_infoNameDict, result_tw_userInfoTot
コード例 #2
0
def findList_AML_TwitterFollower(username):
    sy = TwitterFollower.objects.filter(user_id=username)

    fllwerNameList = []
    fllwerInfoTextList = []
    for a in range(len(sy)):
        fllwerName = sy[a].follower_name
        fllwerPageID = sy[a].follower_page_id
        fllwerInfoText = sy[a].follower_info

        #리스트 생성
        fllwerNameList.append(fllwerName)
        fllwerInfoTextList.append(fllwerInfoText)

    result_tw_fllwerNameDict = generator.gen_AlphabeticalDict(
        fllwerNameList, '트위터팔로워하는사람이름')
    result_twit_fllwerInfoTextDict = generator.gen_AlphabeticalDict(
        fllwerInfoTextList, '트위터팔로워정보텍스트')

    # merge two dictionary which has same keys.
    result_tw_fllwerTxtInfoTot = defaultdict(list)

    # Merge two Dictionary
    for k, v in chain(result_tw_fllwerNameDict.items(),
                      result_twit_fllwerInfoTextDict.items()):
        result_tw_fllwerTxtInfoTot[k].append(
            str(v).replace('[', '').replace(']', '').replace('\'', ''))
    print('final_02: ', fllwerName, fllwerPageID, result_tw_fllwerTxtInfoTot)

    return result_tw_fllwerTxtInfoTot
コード例 #3
0
def findList_AML_TwitterTweet(username):
    sy = TwitterTweet.objects.filter(user_id=username)

    pageIDList = []
    tweetContentList = []
    tweeterNameList = []
    for a in range(len(sy)):
        pageID = sy[a].tweet_page_id
        tweetContent = sy[a].tweet_text
        tweetDate = sy[a].tweet_date
        tweeterName = sy[a].tweet_name

        tweetContent = tweetContent.replace('\r', '').replace('\n', '')

        # 리스트 생성
        pageIDList.append(pageID)
        tweetContentList.append(tweetContent)
        tweeterNameList.append(tweeterName)

    result_pageIDDict = generator.gen_AlphabeticalDict(pageIDList,
                                                       '트위터트윗한사람페이지ID')
    result_tweetContentDict = generator.gen_AlphabeticalDict(
        tweetContentList, '트위터트윗내용')
    result_tweeterNameDict = generator.gen_AlphabeticalDict(
        tweeterNameList, '트위터트윗한사람이름')

    print('final_05: ', result_pageIDDict, result_tweetContentDict,
          result_tweeterNameDict)

    return result_tweetContentDict
コード例 #4
0
def findList_AML_TwitterTrends(username):
    sy = TwitterTrends.objects.filter(user_id=username)

    trendTitleList = []
    trendtweetCntList = []
    for a in range(len(sy)):
        trendTitle = sy[a].trends_name  # 트위터트랜드타이틀정보
        trendtweetCnt = sy[a].trends_tweet_cnt  # 트위터트랜드트윗수정보

        trendTitle = trendTitle.replace('\r', '').replace('\n', '')

        # 리스트 생성
        trendTitleList.append(trendTitle)
        trendtweetCntList.append(trendtweetCnt)

    result_trendTitleDict = generator.gen_AlphabeticalDict(
        trendTitleList, '트위터트랜드타이틀정보')
    result_trendtweetCntDict = generator.gen_AlphabeticalDict(
        trendtweetCntList, '트위터트랜드트윗수')

    # merge two dictionary which has same keys.
    result_tw_TrendInfoTot = defaultdict(list)

    # Merge two Dictionary
    for k, v in chain(result_trendTitleDict.items(),
                      result_trendtweetCntDict.items()):
        result_tw_TrendInfoTot[k].append(
            str(v).replace('[', '').replace(']', '').replace('\'', ''))

    print('final_04: ', trendTitleList, trendtweetCntList,
          result_tw_TrendInfoTot)

    return result_tw_TrendInfoTot
コード例 #5
0
def findList_AML_InstagramInfo(username):
    sy = InstagramInfo.objects.get(user_id=username)

    introText = sy.intro

    result_inst_IntroTxtDict = generator.gen_AlphabeticalDict(
        introText, '사용자의인스타그램Intro정보')

    print('final_17: ', result_inst_IntroTxtDict)
コード例 #6
0
def findList_AML_facebookPost(username):
    sy = FacebookPost.objects.get(user_id=username)

    postContents = sy.post_text
    postDate = sy.post_date
    postTogetherPerson = sy.post_info

    result_fb_PostTxtDict = generator.gen_AlphabeticalDict(postContents, '페이스북게시글내용')
    result_fb_PostWithPersonNameDict = generator.gen_AlphabeticalDict(postTogetherPerson, '페이스북게시글함께하는사람이름')

    # merge two dictionary which has same keys.
    result_fb_PostTxtTot = defaultdict(list)

    # Merge two Dictionary
    for k, v in chain(result_fb_PostTxtDict.items(), result_fb_PostWithPersonNameDict.items()):
        result_fb_PostTxtTot[k].append(v)

    print('final_12: ', postDate, result_fb_PostTxtTot)
コード例 #7
0
def findList_AML_youtubeSubscribe(username):
    sy = YoutubeSubscribe.objects.get(user_id=username)
    channerInfo = sy.channel_info

    # in common
    result_yt_SubscripTxtDict = generator.gen_AlphabeticalDict(
        channerInfo, '유튜브해당채널의 상세설명')

    print('final_09: ', result_yt_SubscripTxtDict)
コード例 #8
0
def findList_AML_youtubeCommentsText(username):
    sy = YoutubeCommentHistory.objects.get(user_id=username)

    commentedVideoTitle = sy.video_name
    commentedcontent = sy.video_comment

    # in common
    result_yt_CommentVideoTitleTxtDict = generator.gen_AlphabeticalDict(
        commentedVideoTitle, '유튜브댓글비디오제목')
    result_yt_CommentaryTxtDict = generator.gen_AlphabeticalDict(
        commentedcontent, '유튜브댓글내용')

    # merge two dictionary which has same keys.
    result_yt_CommentTxtTot = defaultdict(list)

    for k, v in chain(result_yt_CommentVideoTitleTxtDict.items(),
                      result_yt_CommentaryTxtDict.items()):
        result_yt_CommentTxtTot[k].append(v)

    print('final_11: ', result_yt_CommentTxtTot)
コード例 #9
0
def findList_AML_InstagramPostInfo(username):

    sy = InstagramPost.objects.get(user_id=username)

    postText = sy.post_info
    postPlace = sy.post_place

    result_insta_PostTxtDict = generator.gen_AlphabeticalDict(
        postText, '사용자인스타그램게시물Text정보')
    result_insta_PostPlaceDict = generator.gen_AlphabeticalDict(
        postPlace, '사용자인스타그램게시물Place정보')

    # merge two dictionary which has same keys.
    result_insta_PostTxtTot = defaultdict(list)

    # Merge two Dictionary
    for k, v in chain(result_insta_PostTxtDict.items(),
                      result_insta_PostPlaceDict.items()):
        result_insta_PostTxtTot[k].append(v)

    print('final_18: ', result_insta_PostTxtTot)
コード例 #10
0
ファイル: gmailWordComposer.py プロジェクト: grapevine26/test
def findList_AML_gmailReceivedMailInfo(username):
    sy = GmailList.objects.get(user_id=username)

    sender = sy.gmail_sender
    mailTitle = sy.gmail_title
    mailContents = sy.gmail_contents

    result_gmail_MailReceivedMailTitleDict = generator.gen_AlphabeticalDict(
        mailTitle, '받은Gmail제목')
    result_gmail_MailReceivedMailContentDict = generator.gen_AlphabeticalDict(
        mailContents, '받은Gmail내용')

    # merge two dictionary which has same keys.
    result_gmail_ReceivedMail_TxtTot = defaultdict(list)

    # Merge two Dictionary
    for k, v in chain(result_gmail_MailReceivedMailTitleDict.items(),
                      result_gmail_MailReceivedMailContentDict.items()):
        result_gmail_ReceivedMail_TxtTot[k].append(v)

    print('final_25:', sender, result_gmail_ReceivedMail_TxtTot)
コード例 #11
0
def findList_AML_youtubeRecentVideo(username):

    sy = YoutubeRecentVideo.objects.get(user_id=username)
    videoTitle = sy.video_name
    videoInfo = sy.video_info

    # in common
    result_yt_RecentWatchedVideoTitleDict = generator.gen_AlphabeticalDict(
        videoTitle, '최근 본 채널 내 영상 제목')
    result_yt_RecentWatchedVideoContentDiscripDict = generator.gen_AlphabeticalDict(
        videoInfo, '최근 본 채널 내 영상 상세설명')

    # print('Youtube Test Printing:', resultTxtDict_01, resultTxtDict_02)

    # merge two dictionary which has same keys.
    result_yt_RecentWatchedVideoTxt = defaultdict(list)

    for k, v in chain(result_yt_RecentWatchedVideoTitleDict.items(),
                      result_yt_RecentWatchedVideoContentDiscripDict.items()):
        result_yt_RecentWatchedVideoTxt[k].append(v)

    print('final_10: ', result_yt_RecentWatchedVideoTxt)