You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for script in scripts:
#print('i am in '+dir_path,'script is '+script)
#print('script.string:',script.string)
print('type pattern',pattern)
print('pattern', pattern)
print('type:',type(script.string))
m = re.search(pattern, script.string)
if m and 'pl.content.followTab.index' in script.string:
all_info = m.group(1)
cont = json.loads(all_info).get('html', '')
soup = BeautifulSoup(cont, 'html.parser')
pattern = 'uid=(.*?)&'
if 'pageList' in cont:
urls2 = soup.find(attrs={'node-type': 'pageList'}).find_all(attrs={
'class': 'page S_txt1', 'bpfilter': 'page'})
length += len(urls2)
return length
The text was updated successfully, but these errors were encountered:
myrainbowandsky
changed the title
mysql数据库里user_relation这样表 一直是空,是哪里有问题?
user.py 中 script.string 有bug 导致 mysql数据库里user_relation这样表 一直是空
Mar 26, 2020
myrainbowandsky
changed the title
user.py 中 script.string 有bug 导致 mysql数据库里user_relation这样表 一直是空
user.py 中 script.string 有bug 导致 mysql数据库表user_relation一直是空
Mar 26, 2020
报错bug
user.py 中 script.string 有bug
script.string 这里有bug无法判断是哪个类型一会nontype,一会是<class 'bs4.element.NavigableString'>
无论哪种类型都无法用re 模块抓取
The text was updated successfully, but these errors were encountered: