說真的,上他的課程成效真的不彰,不知道是因為太難還是我太廢,總之還是有幫助到我企業電腦網路的報告,這堂課最大功用竟然是幫我做了一個javascript小遊戲笑死。

再來,下一步來個javascript課程好了。

她家 發表在 痞客邦 留言(0) 人氣()

...時間悄悄的流逝,不知不覺2月了,三個月沒寫部落格了,不能再耍廢了。

寒假瘋狂打apex,發現自己真的沒天分,槍法有進步,但作戰觀念極差。

她家 發表在 痞客邦 留言(0) 人氣()

Udemy(全端大概了解一遍) => Udemy(WordPress脫離痞克幫) => Lidemy(Git版本控制,希望能搞清楚這到底在幹嘛)

=> Udemy(Advanced Javascript開始熟悉框架) => 六角學院(Node.js我想順便碰碰後端 )=> 六角學院(Vue實際框架開發使用) => 找到實習!!!!!!

她家 發表在 痞客邦 留言(0) 人氣()

 

S__33914898.jpg

她家 發表在 痞客邦 留言(0) 人氣()

{基本構造}

<!DOCTYPE html>

她家 發表在 痞客邦 留言(0) 人氣()

其實暑假前就寫過一點了,但是那時候沒甚麼決心,都是隨便翻翻書學的,學的也很混,哀,明明時間那麼多卻被我浪費,會想寫網頁是因為,我怕軟工爆掉= =。

然後最近都會不知不覺的很晚睡,早上沒精神上課...有點本末倒置,可是我越晚越嗨越有精神,不知道能不能改進哈哈哈。

她家 發表在 痞客邦 留言(0) 人氣()

import requests
import time
import json
from bs4 import BeautifulSoup

PTT_url = 'https://www.ptt.cc'

def get_web_page(url):
    resp = requests.get(
        url = url,
        cookies = {'over18':'1'}
    )
    if resp.status_code !=200:
        print('Ivalid url:', resp.url)
        return None
    else:
        return resp.text

def get_articles(dom, date):
    soup = BeautifulSoup(dom, 'html.parser')
    paging_div = soup.find('div', 'btn-group btn-group-paging')
    prev_url = paging_div.find_all('a')[1]['href']
    articles = []
    divs = soup.find_all('div', 'r-ent')
    for d in divs:
        if d.find('div', 'date').text.strip() == date:
            push_count = 0
            push_str = d.find('div', 'nrec').text
            if push_str:
                try:
                    push_count = int(push_str)
                except ValueError:
                    if push_str == '':
                        push_count = 99
                    elif push_str.startswith('X'):
                        push_count = -10
            if d.find('a'):
                href = d.find('a')['href']
                title = d.find('a').text
                author = d.find('div', 'author').text if d.find('div', 'author') else ''  # author = d.find('div', 'author').text if d.find('div', 'author') else ''
                articles.append({
                    'title': title,
                    'href': href,
                    'push_count': push_count,
                    'author': author
                })
        return articles, prev_url

def get_author_ids(posts, pattern):
    ids = set()
    for post in posts:
        if pattern in post['author']:
            ids.add(post['author'])
    return ids

if __name__ == '__main__':
    current_page = get_web_page(PTT_url + '/bbs/Gossiping/index.html')
    if current_page:
        articles = []
        today = time.strftime("%m/%d").lstrip('0')
        current_articles, prev_url = get_articles(current_page, today)
        while current_articles:
            articles += current_articles
            current_page = get_web_page(PTT_url + prev_url)
            current_articles, prev_url = get_articles(current_page, today)
        print(get_author_ids(articles, '5566'))
        print('今天有', len(articles), '篇文章')
        threshold = 50
        print('熱門文章(> %d ):' % (threshold))
        for a in articles:
            if int(a['push_count']) > threshold:
                print(a)
        with open('gossiping.json', 'w', encoding='utf-8') as f:
            json.dump(articles, f, indent=2, sort_keys=True, ensure_ascii=False)

她家 發表在 痞客邦 留言(0) 人氣()

import requests
import re
from bs4 import BeautifulSoup


def main():
    URL = 'https://www.dcard.tw/f'
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}
    resp = requests.get(URL, headers=headers)
    soup = BeautifulSoup(resp.text, 'html.parser')

    articles = []
    # 找出所有 role="article"  <article> tag
    article = soup.find_all('article', {"role": "article"})
    for div in article:
        author = div.find("div",{'class': 'euk31c-2 kFrzdN'}).text.strip()
        title = div.find("h2").text.strip()
        href = div.h2.a['href']
        text = div.find("div", class_="uj732l-0 eLjDMI").text.strip()

        articles.append({
            'author':author,
            'title': title,
            'href' : href, 
            'text' : text
        })
    print(articles, (len(articles)))


if __name__ == '__main__':
    main()


文章標籤

她家 發表在 痞客邦 留言(0) 人氣()

有點對一堆英文的論文感到害怕,我以為經歷過第一篇的摧殘我會有所成長,乾你的行銷管理,還好是大家自己小組內外包,不然我應該會掛掉哈哈哈哈

總之禮拜日要考多益,想體驗一下,碩士近來到畢業英文到底進步了多少。

文章標籤

她家 發表在 痞客邦 留言(0) 人氣()

\\MYASUS可以診斷電腦問題\\

爬了很多相關DiskPartition的文,結論是同一顆硬碟壞了就是壞了,不用分甚麼c槽d槽,我的理解沒錯吧...記得備份!

她家 發表在 痞客邦 留言(0) 人氣()

1 2