Wix is a very popular website builder. It is used by over 100 million people across 190 different countries.
Today we will share how to add a table of content to Wix blog by python code.
How to add a table of content to Wix blog?
- curl website link > filename
curl https://www.howtouselinux.com/post/15-linux-multipath-examples-for-linux-admin >howtouselinux
Get Your Free Linux training!
Join our free Linux training and discover the power of open-source technology. Enhance your skills and boost your career! Learn Linux for Free!- python code to get the title id and title name automatically
#-*-coding:utf-8-*-
from bs4 import BeautifulSoup
soup = BeautifulSoup(open('howtouselinux'),'html.parser')
for i in soup.find_all('h3') :
id=i['id']
print '
- copy the command output to wix blog
- add the output to wix blog
Then you can get a table of content for your link.
Example in this post: