weixin_39961237
chuh87
2020-12-08 13:59

如何爬取微信里收到的文件?

50
  • python
  • android

已经抓到文件类型的微信消息格式如下:

不知道下一步怎么分析出URL下载文件?

<msg>
	<appmsg appid="wx6618f1cfc6c132f8" sdkver="0">
		<title>晨会焦点-20201208.pdf</title>
		<des />
		<action>view</action>
		<type>6</type>
		<showtype>0</showtype>
		<content />
		<url />
		<dataurl />
		<lowurl />
		<lowdataurl />
		<recorditem><![CDATA[]]></recorditem>
		<thumburl />
		<messageaction />
		<extinfo />
		<sourceusername />
		<sourcedisplayname />
		<commenturl />
		<appattach>
			<totallen>1202541</totallen>
			<attachid>@cdn_305302010004473045020100020466708af002032f56c102041324e17a02045fcee0e7042036643962343262643765313439336530323632323933373532316466393037320204010400050201000405004c54a100_c4c14e3b0b5573f241f42c432c11c0d1_1</attachid>
			<emoticonmd5></emoticonmd5>
			<fileext>pdf</fileext>
			<cdnattachurl>305302010004473045020100020466708af002032f56c102041324e17a02045fcee0e7042036643962343262643765313439336530323632323933373532316466393037320204010400050201000405004c54a100</cdnattachurl>
			<aeskey>c4c14e3b0b5573f241f42c432c11c0d1</aeskey>
			<encryver>1</encryver>
		</appattach>
		<weappinfo>
			<pagepath />
			<username />
			<appid />
			<appservicetype>0</appservicetype>
		</weappinfo>
		<websearch />
		<md5>6729a36e4db0d895f4a66fcdba265081</md5>
	</appmsg>
	<fromusername>Kim_SunnyunhoCC</fromusername>
	<scene>0</scene>
	<appinfo>
		<version>7</version>
		<appname>微信电脑版</appname>
	</appinfo>
	<commenturl />
</msg>
  • 点赞
  • 收藏
  • 复制链接分享

2条回答