INFP-T / Arch User / Student / Learning FullStack Developer / CICD / CSCI
weepingdogel / titlegetter Goto Github PK
View Code? Open in Web Editor NEW用来获取链接标题的小爬虫...
License: MIT License
用来获取链接标题的小爬虫...
License: MIT License
According to the test, I spot a bug when trying getting multiple titles.
/_ __/(_)/ /_ / /___ / ____/___ / /_ / /_ ___ _____
/ / / // __// // _ \ / / __ / _ \ / __// __// _ \ / ___/
/ / / // /_ / // __/ / /_/ // __// /_ / /_ / __// /
/_/ /_/ \__//_/ \___/ \____/ \___/ \__/ \__/ \___//_/
By WeepingDogel
[Loaded] https://wiki.gentoo.org/wiki/Main_Page
Traceback (most recent call last):
File "/usr/bin/titlegetter", line 232, in <module>
Page = Do.GetPage(headers=headers, URL=PureURL, session=session)
TypeError: Process.GetPage() missing 1 required positional argument: 'config'
Obviously, it's a problem in missing an argument in line 232.
Page = Do.GetPage(headers=headers, URL=PureURL, session=session)
OK, then I'll add it back here.
Page = Do.GetPage(headers=headers, URL=PureURL, session=session, config=config)
then, problem is fixed! All done!
当 list.txt
中出现空行时
https://github.com/WeepingDogel/TitleGetter
https://github.com/piggy-moe/subtitle
https://www.bilibili.com/
就会报错
weepingdogel@WeepingDogel ~/写/P/TitleGetter (master) [1]> proxychains -q python titlegetter.py
╭━━━━╮╭╮╭╮╱╱╱╱╭━━━╮╱╱╭╮╱╭╮
┃╭╮╭╮┣╯╰┫┃╱╱╱╱┃╭━╮┃╱╭╯╰┳╯╰╮
╰╯┃┃┣╋╮╭┫┃╭━━╮┃┃╱╰╋━┻╮╭┻╮╭╋━━┳━╮
╱╱┃┃┣┫┃┃┃┃┃┃━┫┃┃╭━┫┃━┫┃╱┃┃┃┃━┫╭╯
╱╱┃┃┃┃┃╰┫╰┫┃━┫┃╰┻━┃┃━┫╰╮┃╰┫┃━┫┃
╱╱╰╯╰╯╰━┻━┻━━╯╰━━━┻━━┻━╯╰━┻━━┻╯
Version: 1.0.1
Type a filename: try2
Requested Successfully
[GitHub - WeepingDogel/TitleGetter: 用来获取链接标题的小爬虫...](https://github.com/WeepingDogel/TitleGetter)
Requested Successfully
[GitHub - piggy-moe/subtitle: a command line tool for extracting hard-coded subtitles from videos](https://github.com/piggy-moe/subtitle)
Requested Successfully
[哔哩哔哩 (゜-゜)つロ 干杯~-bilibili](https://www.bilibili.com/)
Traceback (most recent call last):
File "titlegetter.py", line 68, in <module>
response = session.get(url,headers=headers)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 516, in request
prep = self.prepare_request(req)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 449, in prepare_request
p.prepare(
File "/usr/lib/python3.8/site-packages/requests/models.py", line 314, in prepare
self.prepare_url(url, params)
File "/usr/lib/python3.8/site-packages/requests/models.py", line 388, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant http://?
抓出来的都是
Title: Sina Visitor System
不知道该如何解决
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.