080503 - Steam Popular Games
最后更新于
这有帮助吗?
最后更新于
这有帮助吗?
基嵐是個對steam遊戲十分著迷的遊戲迷,他時常都在關注現在在steam上,大家都在玩的遊戲,不過他並不是每種熱門遊戲都玩,他蠻注重遊戲的種類與封面圖片,所以請你幫他把steam上,在 大家都在玩 分頁的所有遊戲爬下來(第一頁到第五頁即可),讓他可以快速的選擇他想玩的遊戲。
Kieran is a game fan that is addicted to the steam game, he often follows popular games on the steam. But he care about the type and cover photo of the game so that he doesn't play each popular game. So, please help him to quickly pick what game he want to play via crawl all the information of games in the tab named What's Being Played (from page 1 to page 5).
請從上方連結開始爬,利用 Selenium Library
搭配 beautifulsoup4 Library
和/或 Regex Library
來抓取遊戲的名稱、標籤名稱,以及封面圖片。
Please start to do the web scraping from the link above, and use Selenium Library
, beautifulsoup4 Library
and/or Regex Library
to obtain the name, cover photo and tags of each game.
請將爬取到的遊戲的封面圖片放大成原本大小的7倍,且把獲取到的標籤以白底紅字的方式放在圖片 正中間 (請將字串的中心點與圖片中心點對齊)。此外,請在當下路徑創建一個steam
的資料夾,並且將處理過的圖片以遊戲名稱當作檔案名稱,儲存在steam
的資料夾中。注意:請確保所有紅字都在白底之中。
Please enlarge the cover image of the crawled game to 7 times its original size, and put obtained tags in the form of red text on a white background in the center of the image (Please align the center point of the string with the center point of the picture). In addition, please create a steam
folder in the current path, and save the processed pictures in the steam
folder with the game name as the file name. Notice: Please make sure that all red words on the white background.
爬蟲步驟: 1. 開啟瀏覽器 2. 切換語言至英文 3. 點擊 Free to Play 連結 4. 選擇 What's Being Played 分頁 5. 取得你需要的每個遊戲資訊後,點擊下一頁按鈕(到第五頁為止) 6. 關掉瀏覽器
Web Scraping Step: 1. Open browser 2. Change Language to English 3. Click Free to Play link button 4. Select the What's Being Played tab option 5. Click next page button after you got all information about each game what you want (until arrive at page 5) 6. Close browser
若遊戲名稱中有中文或其他符號(像是.
、:
、™
等等)的話,請將其換成_
,但若這些須替換的符號在名稱的最前面或最後面則需刪掉。
If there are Chinese or other symbols in the game name (such as .
, :
, ™
, etc.), please use _
instead, but if these symbols or Chinese are at the beginning or end of the name, they should be deleted.
請將瀏覽器的驅動執行檔放在你使用的虛擬環境中,這樣在程式碼中可直接使用webdriver.Firefox()
即可。
Please put the driver executable file of the browser in the virtual environment you are using, so that you can use webdriver.Firefox()
directly in the code.