# 哪位能否分享一个自己写的简单点的python爬虫实例学习一下

**URL:** <https://forum.freemdict.com/t/topic/16081>\
**Category:** 资源求助\
**Created:** [2022 年10 月 8 日 14:21 UTC](https://forum.freemdict.com/t/topic/16081 "2022-10-08T14:21:53Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

作者： ![surfactant](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@surfactant](https://forum.freemdict.com/u/surfactant)\
发布日期： [2022 年10 月 9 日 18:53 UTC](https://forum.freemdict.com/t/topic/16081/7 "2022-10-09T18:53:08Z")

</div>

把 @Sunny1 老兄推荐的这位前辈的一个爬虫程序仔细研究了一下，加了点注解把变量名按自己的习惯改复杂了

> [@谁愿意帮我爬一遍 WordReference](https://forum.freemdict.com/t/topic/6428/44):
>
> 发现用 wget 下载 WR 网页，会被重定向到 Yahoo 网站，这可能就是 WR 的反爬措施。改了代码，禁了重定向，你最后再运行一次吧。 [wg04-16.py](https://forum.freemdict.com/uploads/short-url/laIUPKONkbD9EJjPDDDgKIO3Q5N.py) (1.8 KB)

在我的VS中怎么跑都没问题，但是在Win下直接点击运行出现下面的屏幕，后来不知怎么又闪退，应该是中文注解引起的，请专家有空的话帮忙看下什么原因，谢谢！  
[wg04-16 (lurker)(#44)(annotated).py](https://forum.freemdict.com/uploads/short-url/rgoMan1m0j0L0DoA015c3oheiPK.py) (4.8 KB)  
又试了下原帖中的代码，结果一样的，VS中运行可以，直接在 Win下运行不行，从窗口提示看是跑到保存文件的步骤时闪退的。

 ![Image](https://forumcdn.freemdict.com/uploads/default/original/3X/4/4/446ea33e1634f40da1c88739fdde590cfb18774c.png)

---

_[View the full topic](https://forum.freemdict.com/t/topic/16081)._
