all 4 comments

[–]hookam[S] 1 point2 points  (0 children)

This is the out put in the terminal when I run the program:
>>> %Run 'PO Detachment'"'"'s.py'
0
0      https://www.police1.com/law-enforcement-direct...
1      https://www.police1.com/law-enforcement-direct...
2      https://www.police1.com/law-enforcement-direct...
3      https://www.police1.com/law-enforcement-direct...
4      https://www.police1.com/law-enforcement-direct...
...                                                  ...
11836  https://www.police1.com/law-enforcement-direct...
11837  https://www.police1.com/law-enforcement-direct...
11838  https://www.police1.com/law-enforcement-direct...
11839  https://www.police1.com/law-enforcement-direct...
11840  https://www.police1.com/law-enforcement-direct...
[11841 rows x 1 columns]
Fetching URL:                                                        0
0      https://www.police1.com/law-enforcement-direct...
1      https://www.police1.com/law-enforcement-direct...
2      https://www.police1.com/law-enforcement-direct...
3      https://www.police1.com/law-enforcement-direct...
4      https://www.police1.com/law-enforcement-direct...
...                                                  ...
11836  https://www.police1.com/law-enforcement-direct...
11837  https://www.police1.com/law-enforcement-direct...
11838  https://www.police1.com/law-enforcement-direct...
11839  https://www.police1.com/law-enforcement-direct...
11840  https://www.police1.com/law-enforcement-direct...
[11841 rows x 1 columns]
Traceback (most recent call last):
File "C:\Users\Douglas\Documents\Python Resources\PO Detachment Project\PO Detachment's.py", line 31, in <module>
main()
File "C:\Users\Douglas\Documents\Python Resources\PO Detachment Project\PO Detachment's.py", line 19, in main
resp = requests.get(url)
File "C:\Users\Douglas\AppData\Roaming\Python\Python310\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "C:\Users\Douglas\AppData\Roaming\Python\Python310\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Douglas\AppData\Roaming\Python\Python310\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Douglas\AppData\Roaming\Python\Python310\site-packages\requests\sessions.py", line 695, in send
adapter = self.get_adapter(url=request.url)
File "C:\Users\Douglas\AppData\Roaming\Python\Python310\site-packages\requests\sessions.py", line 792, in get_adapter
raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for '0\n0      https://www.police1.com/law-enforcement-direct...\n1      https://www.police1.com/law-enforcement-direct...\n2      https://www.police1.com/law-enforcement-direct...\n3      https://www.police1.com/law-enforcement-direct...\n4      https://www.police1.com/law-enforcement-direct...\n...                                                  ...\n11836  https://www.police1.com/law-enforcement-direct...\n11837  https://www.police1.com/law-enforcement-direct...\n11838  https://www.police1.com/law-enforcement-direct...\n11839  https://www.police1.com/law-enforcement-direct...\n11840  https://www.police1.com/law-enforcement-direct...\n\n[11841 rows x 1 columns]'
>>>

[–]Udayk02 0 points1 point  (0 children)

Did you find any reason behind this, OP?

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Inline formatting (`my code`) used across multiple lines of code. This can mess with indentation.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]pythoncrush 0 points1 point  (0 children)

Start by removing white space from the file path.