小东7878 发表于 2020-3-27 22:55:47

1

营长的大炮 发表于 2020-3-28 08:19:01

666

营长的大炮 发表于 2020-3-28 08:55:44

file = open(where+"\"+"%s_%d.gif" % (str1,count),'wb')



这句话报错,,,求回复

营长的大炮 发表于 2020-3-28 09:06:15

疾风。意破天晴 发表于 2016-10-19 19:30
自顶一下,明天看反馈

大佬,

else :
                  continue
            file = open(where+"\"+"%s_%d.gif" % (str1,count),'wb')
            file.write(fin_img)
            file.close()
            print("已下载:"+"\n"+"%s_%d.gif" % (str1,count))
            count += 1
      return count

这段的file = open(where+"\"+"%s_%d.gif" % (str1,count),'wb')
出错了,求回复

Python大鲸鱼 发表于 2020-3-28 11:08:37

11

ldzxc 发表于 2020-4-27 11:46:32

66666

群仔 发表于 2020-4-27 20:30:10

厉害,才刚学,撒都不懂

Veblent_Azz 发表于 2020-5-12 18:20:57

https://imgchr.com/i/YNrzDO[/img
]https://imgchr.com/i/YNrxKK
https://imgchr.com/i/YNrjv6
这三个图的代码有问题,第一个和第三个图是引号未闭合,第二张图要把里面的斜杠转义一下。

yishuiliangan 发表于 2020-7-13 20:09:44

C:\Users\lenovo\PycharmProjects\untitled\venv\Scripts\python.exe C:/Users/lenovo/PycharmProjects/untitled/123.py
File "C:/Users/lenovo/PycharmProjects/untitled/123.py", line 28
    src=re.compile(".{3,4}[      DISCUZ_CODE_0      ]quot;)):
                                                                        ^
SyntaxError: EOL while scanning string literal

Process finished with exit code 1
是什么意思

linxi201210 发表于 2021-2-28 08:20:32

不会英语的路过一下

贪睡的苏简 发表于 2021-4-6 14:49:53

唉,容易忘记东西的大脑表示,得反复去查

叼辣条闯世界 发表于 2021-7-10 08:15:27

二十六行是不是少了引号?
for l in h_soup.find_all("img",class_ = re.compile("align.+"),src = re.compile(".{3,4}[      DISCUZ_CODE_0      ]quot;)):

黑Ren牙膏 发表于 2021-10-26 12:29:07

cy黄虫

xqq1984 发表于 2021-10-26 13:00:50

beautifulsoup怎么使用pip install安装出现报错

fjzpcca 发表于 2021-10-29 10:05:53

学习一下

juscy 发表于 2022-2-7 19:01:04

6

隔壁老程呀 发表于 2022-2-7 20:04:44

差距怎么这么大呀

n200107 发表于 2022-7-9 23:04:43

先頂再看

phxx 发表于 2022-9-7 23:21:08

营长的大炮 发表于 2020-3-28 08:55
file = open(where+"\"+"%s_%d.gif" % (str1,count),'wb')





这样就好了file = open(where+"\"""+"%s_%d.gif" % (str1,count),'wb')

phxx 发表于 2022-9-7 23:21:50

叼辣条闯世界 发表于 2021-7-10 08:15
二十六行是不是少了引号?
for l in h_soup.find_all("img",class_ = re.compile("align.+"),src = re.com ...

少了个"
页: 182 183 184 185 186 187 188 189 190 191 [192] 193
查看完整版本: 最终版【18禁】一只贼能爬动图的——黄虫。绅士和妹子都来看看吧!