สวัสดีครับ คือผมต้องการเรียนรู้การใช้ selenium ในการคลิกลิ้งค์รายการเพลงในยูทูปที่ผมสามารถใช้เสียงในการค้นหาครับ
ผมไปศึกษาของต่างชาติมาหลายวัน ก็ฟังไม่ค่อยรู้เรื่องเลยครับ
By Jackkey on
Tag:
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
คุณ Jackkey ติดตรงไหนเหรอครับ
idxn Mon, 18/12/2017 - 10:26
คุณ Jackkey ติดตรงไหนเหรอครับ คือผมไม่มีความรู้ในเรื่อง voice recognition ละนะ แต่เรื่อง selenium สอบถามได้ครับ
while (2):
Jackkey Mon, 18/12/2017 - 22:49
In reply to คุณ Jackkey ติดตรงไหนเหรอครับ by idxn
if txt.find("ค้นหา") == 0:
s = txt.split("ค้นหา")
a = str(s[1])
a = s[1]
a = a.replace(',', '')
webbrowser.get('windows-default').open_new_tab('https://www.youtube.com/results?search_query=%s' % a)
if txt.find("รายการที่ 1") == 0:****
driver.navigate()***
elif txt.find("ย้อนกลับ") == 0:
driver..back()
elif txt.find("ปิด") == 0:
** driver.close()
คือผม ไม่สามารถใช้คำสั่งเสียงในการกดเลือกรายการวีดีโอที่ค้นหาได้อ่ะครับ ตรงเครื่องหมาย ** ข้างต้นนี้อ่ะครับ คือผมไม่ค่อยรู้จักโครงสร้าง ของ selenium ผมกำลังศึกษาคร่าว ๆ จากเว็บไวต์นี้ครับ http://www.mindphp.com/forums/viewtopic.php?f=16&t=43896
ขนาดผมจะใช้ driver.get("https://www.youtube.com/results?search_query=%s " % a) ยังไม่ถูกเลยครับ
จึงจำเป็นต้องใช้ module webbrowser ไปก่อนครับ
ตรงที่ผมทำเครื่องหมาย ** ไว้ โปรแกรมมันแจ้งว่า NameError: name 'driver' is not defined ทั้งที่ผมก็เรียนใช้งาน module แล้วนะครับ
เลยอยากถามผู้เชี่ยวชาญและผู้รู้เกี่ยวกับ selenium ครับ
แปะลิงค์ให้ครับ
mindphp Sun, 16/05/2021 - 14:03
In reply to while (2): by Jackkey
แปะลิงค์ให้ครับ
http://www.mindphp.com/forums/viewtopic.php?f=16&t=43896
มีการอัพเดดเนื้อหาใหม่ๆ อยู่ตลอดนะครับ ติดตามได้
driver ต้อง init มาก่อนครับ
idxn Tue, 19/12/2017 - 10:37
driver ต้อง init มาก่อนครับ ตย.จาก selenium unofficial doc ก็ตามนี้เลย
http://selenium-python.readthedocs.io/getting-started.html#simple-usage
from selenium import webdriver
driver = webdriver.Firefox() #อันนี้ก็เปลี่ยนไปตาม browser ที่จะเปิดครับ
driver.get("http://www.python.org")
assert "Python" in driver.title
อ๋อ ได้แล้วครับ
Jackkey Wed, 20/12/2017 - 01:17
In reply to driver ต้อง init มาก่อนครับ by idxn
อ๋อ ได้แล้วครับ ขอบพระคุณมากเลยครับ ผมขอคำแนะนำสำหรับความช่วยเหลือครั้งสุดท้ายด้วยครับ คือว่า เมื่อผมทำการค้นหารายการวีดีโอด้วยเสียงในยูทูปแล้ว ผมจะทำการเล่นวีดีโอที่ค้นหาได้อย่างไรครับ เพราะลิ้งค์ url ของแต่ละวีดีโอ มันไม่ตายตัวใช่ไหมล่ะครับ เช่น ผมค้นหาว่า คำแพง แล้วผมจะกดเล่นวีดีโอรายการที่ 3 มันจะใช้คำสั่ง selenium ว่าอย่างไรครับ ทำนองนี้หรือป่าวครับ driver.get("ytd-list....") ทำนองนี้หรือป่าวครับ เพราะผมเคยเห้นโปรแกรม JARVIS ที่สามารถสั่งการเป็นภาษาไทยได้อ่ะครับ
ใช้ประมาณนี้ก็ได้ครับ
idxn Fri, 22/12/2017 - 15:12
In reply to อ๋อ ได้แล้วครับ by Jackkey
ใช้ประมาณนี้ก็ได้ครับ
index = 2 #index = วีดีโอรายการที่ 3
elem = driver.find_elements_by_css_selector("#video-title")[index]
elem.click()
หรือจะ chain ทีเดียวไปเลยก็ได้
driver.find_elements_by_css_selector("#video-title")[2].click()
ขอบพระคุณอย่างสูงมากเลยนะครับ
Jackkey Mon, 01/01/2018 - 00:04
In reply to ใช้ประมาณนี้ก็ได้ครับ by idxn
ขอบพระคุณอย่างสูงมากเลยนะครับ เหมือนผมจะก้าวใกล้ความสำเร็จอีกขั้นหนึ่งแล้ว TT
Thanks for the good ideas to
seo.james01 Sun, 22/07/2018 - 11:13
Thanks for the good ideas to bring it. I know a lot more. :) [url=http://balltoyou.com][size=1px]ดูบอล[/size][/url] :J
Thank [คาสิโน](https://UFABET
okradew40 Sat, 10/11/2018 - 16:12
In reply to Thank you for this post. That by NareshIT
Thank [คาสิโน](https://UFABET.ORG/ /สมัคร ufabet.php]:DDD