我需要帮助解决一个简单的练习(我是新的,所以这对我来说就像是heiroglyphics)

时间:2022-06-18 11:21:32

I have to figure out a way to return the titles of all the articles on the front page of slashdot.org within 72 hours. I really have no idea where to even begin, any suggestions?

我必须找到一种方法,在72小时内返回slashdot.org首页上所有文章的标题。我真的不知道从哪里开始,有什么建议吗?

1 个解决方案

#1


  1. Open Slashdot.org
  2. Right-click on headline and select "Inspect element" (Chrome)
  3. 右键单击标题并选择“Inspect element”(Chrome)

  4. Do this again with another headline
  5. 用另一个标题再次这样做

  6. Check for similarities in html-code (like classes)
  7. 检查html代码中的相似之处(如类)

  8. Loop through all elements with same class and write them to an array
  9. 遍历具有相同类的所有元素并将它们写入数组

  10. Write a function that loops through that array and returns each element of the array
  11. 编写一个循环遍历该数组的函数,并返回该数组的每个元素

#1


  1. Open Slashdot.org
  2. Right-click on headline and select "Inspect element" (Chrome)
  3. 右键单击标题并选择“Inspect element”(Chrome)

  4. Do this again with another headline
  5. 用另一个标题再次这样做

  6. Check for similarities in html-code (like classes)
  7. 检查html代码中的相似之处(如类)

  8. Loop through all elements with same class and write them to an array
  9. 遍历具有相同类的所有元素并将它们写入数组

  10. Write a function that loops through that array and returns each element of the array
  11. 编写一个循环遍历该数组的函数,并返回该数组的每个元素