opening .jl file command doesn't show 'my_output_file.jl'
See original GitHub issueMy apologies in advance, I am still a python padawan. I swept through the documentation but couldn’t find an answer.
I am assuming that after i run;
import advertools as adv
adv.crawl('https://example.com', 'my_output_file.jl', follow_links=True)
and then
import pandas as pd
crawl_df = pd.read_json('my_output_file.jl', lines=True)
I am supposed to see the data from the scrape? (I did put in a real URL, and the output file is a 1.6MB .jl file was created. But when I run that cell, nothing happens. No errors but no data either. I am testing this in a jupyter notebook… all requirements are installed etc.
Also, if I may, as an SEO practitioner, how do I output these results into a CSV file that can viewed in excel or google sheets for further analysis? If you’re willing, can you provide an example command as to how to convert the .jl file to .csv? I tried to install json-lines but apparently it’s no longer supported. I assume what I need is to import csv but as far as how to structure it to encapsulate the data with column headers etc is a bit intimidating.
Thanks
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
The
read_json
function reads the jsonlines file and converts it to a DataFrame. It’s all handled by default, so there is nothing to worry about. Once you have a DataFrame, you can easily convert it to another file format if needed.Can you please try running the code on one of the online notebook services like Google Colab or Kaggle and let me know what happens?
If you do so and still have issues, please share access to the notebook, and I’ll look into it.
At least we have some time to do some work before GPT takes over everything hahahaha…
Yes, it’s correct, but there’s no need for the
orient
parameter.Try it on one of the online platforms and feel free to re-open the issue if you still have problems.