คือตอนนี้ผมกำลังทำโปรเจคจบอยู่นะครับ เป็นการไปดึงข้อมูลกระทู้และก็คอมเม้นต่างๆ ในเว็บ Pantip แล้วเอามาวิเคราะห์นะครับ แต่มีปัญหาตรงที่ผมไม่มีความรู้ด้านเว็บเลย เลยไม่รู้ว่าจะไปดึงข้อมูลมาได้ยังไง ที่คิดไว้ก็คือไปตัดเอาข้อความจาก file HTML โดยตรงเลยโดยอาศัย Tag เป็นตัวกำหนดขอบเขตว่าส่วนไหนเป็น หัวข้อ เนื่อหา ผู้โพส วันเวลา แต่ก็เกิดปัญหาว่ามีส่วนหนึ่งที่ผมต้องการมากคือตรง "ถูกใจ" ที่จะแสดงคนที่มาถูกใจโพส แต่ใน source HTML มันไม่มีส่วนนี้แสดงอยู่รู้สึกว่ามันน่าจะเป็น java script นะครับ มีใครพอจะทราบไหมครับว่าจะมีวิธีไหนในการเก็บข้อมูลนี้มาได้นะครับ
Hiring! บริษัทที่น่าสนใจ
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand
view source หา .js
lancaster Wed, 15/02/2012 - 00:56
view source หา .js แล้วลองไล่ตามไปดูครับ จะเจอฟังก์ชั่นที่ดึง like มาโชว์
อันนี้ตามที่ผมลองคิดดูนะ
holyddog Wed, 15/02/2012 - 02:23
อันนี้ตามที่ผมลองคิดดูนะ เริ่มจาก get หัวข้อกระทู้ทั้งหมดของแต่ละหมวดจาก rss feed ซึ่งพันทิพเองมีอยู่แล้ว ในนั้นจะมี link ไปยังเนื้อหากระทู้ต่างๆอยู่ พอได้ลิ้งนั้นแล้วก็ใช้คำสั่งพวก url loader ซึ่งผลลัพจะได้เป็น html content ของลิ้งนั้นทั้งหมดมา พอได้ html มาแล้วที่เหลือก็แค่ดักว่าส่วนไหนเป็นอะไรเพื่อดึงข้อมูลได้แล้วล่ะครับ
Rss
sarunw Wed, 15/02/2012 - 02:30
Rss ส่วนใหญ่แสดงได้ไม่เยอะนะครับ จะเป็นกระทู้ใหม่ๆ
pantip เก็บ ถูกใจ เป็น text
soginal Wed, 15/02/2012 - 10:38
pantip เก็บ ถูกใจ เป็น text file ครับ ลองเปลี่ยน .html เป็น .txt ดูก็จะได้ข้อมูลมาแล้ว
เช่น
http://www.pantip.com/cafe/wahkor/topic/X11700242/X11700242.html
แก้เป็น
http://www.pantip.com/cafe/wahkor/topic/X11700242/X11700242.txt
fotmat ที่เก็บจะเป็น
[reply no.][\t][link to user profile]
*rep no. 0 คือ เนิ้อหากระทู้ครับ
ขอบคุณพี่ๆ ทุกคนมากครับ
N_Kongkotchawan Wed, 15/02/2012 - 21:29
ขอบคุณพี่ๆ ทุกคนมากครับ ทำให้พอเห็นภาพแล้วละครับ
แต่สงสัยตรงที่พี่บอกว่าให้ลองไล่ตามตรง java script
จะใช้วิธีไหนไล่ตามอ่ะครับ แล้วที่มันดึง text file มาแสดงนี้
ดึงมายังไงอ่ะครับ พี่ช่วยแนะนำเรื่องที่ต้องไปศึกษาก็ได้ครับ
ขอบคุณมากๆ ครับ
ใช้ Chrome Developer Tools
anu Wed, 15/02/2012 - 22:40
In reply to ขอบคุณพี่ๆ ทุกคนมากครับ by N_Kongkotchawan
ใช้ Chrome Developer Tools ครับ เปิดแท็ปใหม่ อย่าเพิ่งเข้าเว็บ กด F12 จะมีหน้าต่าง Developer Tools ขึ้นมา ให้กดปุ่ม Network จากนั้นกลับไปหน้าต่างเดิม ให้เข้าเว็บที่ต้องการ รอโหลดเรื่อยๆ จะเจอ .txt เรียกมาจาก topic_include.js:415
ในบราวเซอร์อื่นๆ กระบวนการนี้สามารถดูได้จาก Firebug > Network ของ Firefox หรือ Internet Explorer Developer Tools แถบ Network เหมือนกันครับ
ขอให้โชคดีครับ
ขอบคุณมากครับ
N_Kongkotchawan Thu, 16/02/2012 - 20:31
In reply to ใช้ Chrome Developer Tools by anu
ขอบคุณมากครับ เดี๋ยวจะไปลองดูนะครับ