คำอธิบาย:
Practice your Python Pandas data science skills with problems on StrataScratch! https://www.stratascratch.com/?via=keith In this video we walk through web scraping in Python using the beautiful soup library. We start with a brief introduction to HTML & CSS and discuss what web scraping is. Next we start getting into the basics of the beautiful soup library. This includes how to load a webpage, the basic commands you need to know such as find & find_all, grabbing strings from an HTML elements, etc. The final section of this tutorial is a series of exercises where you can practice your skills. In this section we scrape a webpage for links, we learn how to scrape a table and load it into a pandas dataframe, and we see how you can scrape & download a web image. Hope you enjoy! I’m looking into making future videos on more complex things you can do with web scraping as well as other libraries that are helpful such as Selenium & ScraPy. Subscribe to not miss those. Join the Python Army to get access to perks! YouTube - https://www.youtube.com/channel/UCq6XkhO5SZ66N04IcPbqNcw/join Patreon - https://www.patreon.com/keithgalli --------------------- Resources used in this video Simple webpage: https://keithgalli.github.io/web-scraping/example.html Example webpage: https://keithgalli.github.io/web-scraping/webpage.html Link to source code: https://github.com/KeithGalli/web-scraping Beautiful Soup Documentation: https://www.crummy.com/software/BeautifulSoup/bs4/doc/ CSS Selector Reference: https://www.w3schools.com/cssref/css_selectors.php --------------------- Learn more about HTML/CSS @Traversy Media HTML Crash Course: https://www.youtube.com/watch?v=UB1O30fR-EE @Traversy Media CSS Crash Course: https://www.youtube.com/watch?v=yfoY53QXEnI Codecademy: https://www.codecademy.com/catalog/language/html-css --------------------- Video timeline! 0:00 - Intro & Video Overview 1:09 - What is web scraping? 3:51 - Introduction to HTML Using the beautiful soup library (5:29) 6:31 - Loading in a webpage (requests library) 8:21 - Starting to scrape 9:18 - find & find_all methods 16:00 - Finding specific text/strings in our HTML (regex) 18:38 - Select method (CSS path selections) 25:55 - Grabbing the string/text from an HTML element 28:17 - Getting a property of HTML element (href, src, id, class, etc) 29:41 - Code navigation (parents, children, siblings) Let’s practice our skills! (33:57) 35:53 - Exercise #1: Grab all social links on webpage in 3 different ways 42:09 - Exercise #2: Scrape an HTML table into a Pandas Dataframe 53:09 - Exercise #3: Grab all fun facts that contain the word “is” 57:59 - Exercise #4: Use beautiful soup to help download an image from a webpage 1:04:20 - Exercise #5: Solve the mystery challenge!!! --------------------- Follow me on social media! Instagram | https://www.facebook.com/unsupportedbrowser Twitter | https://twitter.com/keithgalli --------------------- If you are curious to learn how I make my tutorials, check out this video: https://www.youtube.com/watch?v=LEO4igyXbLs *I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
กำลังเตรียมตัวเลือกการดาวน์โหลด
เว็บไซต์ http://unidownloader.com/ เป็นวิธีที่ดีที่สุดในการดาวน์โหลดวิดีโอหรือแทร็กเสียงแยกต่างหาก หากคุณต้องการหลีกเลี่ยงการติดตั้งโปรแกรมและส่วนขยาย
ส่วนขยาย UDL Helper เป็นปุ่มที่สะดวกซึ่งฝังไว้บนเว็บไซต์ YouTube, Instagram และ OK.ru เพื่อการดาวน์โหลดเนื้อหาที่รวดเร็ว
UDL Client (สำหรับ Windows) - โซลูชันที่ทรงพลังที่สุดที่รองรับเว็บไซต์ โซเชียลเน็ตเวิร์ก และไซต์โฮสต์วิดีโอมากกว่า 900 แห่ง รวมถึงคุณภาพวิดีโอใด ๆ ที่มีอยู่ในแหล่งที่มา
UDL Lite - เป็นวิธีที่สะดวกในการเข้าถึงเว็บไซต์จากอุปกรณ์มือถือของคุณ ด้วยความช่วยเหลือนี้ คุณสามารถดาวน์โหลดวิดีโอลงสมาร์ทโฟนของคุณได้โดยตรง
รูปแบบคุณภาพที่ดีที่สุดคือ FullHD (1080p), 2K (1440p), 4K (2160p) และ 8K (4320p) ยิ่งความละเอียดหน้าจอของคุณสูงเท่าไร คุณภาพวิดีโอก็ควรจะสูงขึ้นตามไปด้วย อย่างไรก็ตาม ยังมีปัจจัยอื่นๆ ที่ต้องพิจารณา: ความเร็วในการดาวน์โหลด จำนวนพื้นที่ว่าง และประสิทธิภาพของอุปกรณ์ระหว่างการเล่น
เบราว์เซอร์/คอมพิวเตอร์ไม่ควรหยุดทำงานโดยสิ้นเชิง! หากเกิดเหตุการณ์เช่นนี้ โปรดรายงานพร้อมลิงก์ไปยังวิดีโอ บางครั้งวิดีโอไม่สามารถดาวน์โหลดได้โดยตรงในรูปแบบที่เหมาะสม ดังนั้นเราจึงเพิ่มความสามารถในการแปลงไฟล์เป็นรูปแบบที่ต้องการ ในบางกรณี กระบวนการนี้อาจใช้ทรัพยากรคอมพิวเตอร์อย่างจริงจัง
คุณสามารถดาวน์โหลดวิดีโอลงในสมาร์ทโฟนของคุณได้โดยใช้เว็บไซต์ UDL Lite หรือแอปพลิเคชัน pwa นอกจากนี้ยังสามารถส่งลิงก์ดาวน์โหลดผ่านโค้ด QR โดยใช้ส่วนขยาย UDL Helper ได้อีกด้วย
วิธีที่สะดวกที่สุดคือการใช้ UDL Client ซึ่งรองรับการแปลงวิดีโอเป็นรูปแบบ MP3 ในบางกรณี คุณสามารถดาวน์โหลดไฟล์ MP3 ผ่านส่วนขยาย UDL Helper ได้
คุณลักษณะนี้มีอยู่ในส่วนขยาย UDL Helper ตรวจสอบให้แน่ใจว่าได้เลือกตัวเลือก "ปุ่มแสดงผลเพื่อบันทึกภาพหน้าจอจากวิดีโอ" ในการตั้งค่า ไอคอนกล้องควรปรากฏที่มุมขวาล่างของเครื่องเล่นทางด้านซ้ายของไอคอน "การตั้งค่า" เมื่อคุณคลิก เฟรมปัจจุบันจากวิดีโอจะถูกบันทึกลงในคอมพิวเตอร์ของคุณในรูปแบบ JPEG
ไม่มีค่าใช้จ่ายเลยจริงๆ บริการของเราฟรีสำหรับผู้ใช้ทุกคนอย่างแน่นอน ไม่มีการสมัครสมาชิกแบบ PRO ไม่มีการจำกัดจำนวนหรือความยาวสูงสุดของวิดีโอที่ดาวน์โหลด